This commit is contained in:
Tommy Parnell
2015-09-13 15:51:34 -04:00
parent ac8bb76178
commit 671e2c32a5
9 changed files with 20 additions and 65 deletions

View File

@@ -7,6 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DisplayTemplateExample.Web"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7CAC2251-E691-405B-9F47-DD538BDBD1B6}"
ProjectSection(SolutionItems) = preProject
Capture.PNG = Capture.PNG
Readme.md = Readme.md
EndProjectSection
EndProject

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -14,24 +14,11 @@ namespace DisplayTemplateExample.Web.Controllers
{
new ImageTile {src = "/Content/smpl.jpg" },
new TextTile {Text = "Sample text a" },
new TextTile {Text = "awesome text b" }
new TextTile {Text = "awesome text b" },
new ImageTile {src = "/Content/g.png" }
}
};
return View(viewModel);
}
public ActionResult About()
{
ViewBag.Message = "Your application description page.";
return View();
}
public ActionResult Contact()
{
ViewBag.Message = "Your contact page.";
return View();
}
}
}

View File

@@ -133,6 +133,7 @@
<ItemGroup>
<Content Include="Content\bootstrap.css" />
<Content Include="Content\bootstrap.min.css" />
<Content Include="Content\g.png" />
<Content Include="Content\smpl.jpg" />
<Content Include="favicon.ico" />
<Content Include="fonts\glyphicons-halflings-regular.svg" />
@@ -163,8 +164,6 @@
<Content Include="Views\_ViewStart.cshtml" />
<Content Include="Views\Shared\Error.cshtml" />
<Content Include="Views\Shared\_Layout.cshtml" />
<Content Include="Views\Home\About.cshtml" />
<Content Include="Views\Home\Contact.cshtml" />
<Content Include="Views\Home\Index.cshtml" />
<Content Include="Views\Shared\DisplayTemplates\ImageTile.cshtml" />
<Content Include="Views\Home\Tiles.cshtml" />

View File

@@ -1,7 +0,0 @@
@{
ViewBag.Title = "About";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<p>Use this area to provide additional information.</p>

View File

@@ -1,17 +0,0 @@
@{
ViewBag.Title = "Contact";
}
<h2>@ViewBag.Title.</h2>
<h3>@ViewBag.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

View File

@@ -1,9 +1,5 @@
@model DisplayTemplateExample.Web.Models.ViewModel
@{
ViewBag.Title = "Home Page";
}
<div class="row" id="gallery">
@foreach (var x in Model.Tiles)
{
@@ -11,7 +7,6 @@
@Html.Partial("Tiles", x)
</div>
}
</div>
@section scripts{

View File

@@ -1,3 +1,2 @@
@model DisplayTemplateExample.Web.Models.ITile
@Html.DisplayFor(a => a)

View File

@@ -21,8 +21,6 @@
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li>@Html.ActionLink("Home", "Index", "Home")</li>
<li>@Html.ActionLink("About", "About", "Home")</li>
<li>@Html.ActionLink("Contact", "Contact", "Home")</li>
</ul>
</div>
</div>