Thumbnail for 559

Using Standard Templates for ListView and GridView

Thumbnail for 559

When creating XAML applications using ListView and GridView controls for Windows 8, you probably want your applications to look like “standard” applications. You can reverse-engineer existing applications, but Microsoft makes it a little easier than that. In the documentation, if you search a bit, you’ll find two pages that list some sample, standard DataTemplate examples you can use for your own applications.

For the ListView control, look here: http://bit.ly/R8WUHy

For the GridView control, look here: http://bit.ly/Tc5JQG

You’ll find two problems with these templates. First, they include hard-coded text, and it’s up to you to replace the hard-coded text with binding expressions that work with your own data source. In addition, some of the templates don’t work well with “real” data, and you may need to modify them slightly to work with your bound data. In general, however, these templates can save you a lot of time. Review them all to see what Microsoft has provided. If there’s not an exact match for your application, you can at least use one of these as a starting place.

Thumbnail for 559Ken Getz is a Visual Studio expert with over 25 years of experience as a successful developer and consultant. He is a nationally recognized author and speaker, as well as a featured instructor for LearnNowOnline.

Be Sociable, Share!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

Current day month ye@r *