Derik Whittaker

Syndication

News


Using GridView ItemTemplate and ItemTemplateSelector at the same time

If you are building a XAML based WinRT application which uses a GridView it is very likely you are going to use an ItemTemplate style OR use the ItemTemplateSelector to determine which style to use.  This is great and using either of these could not be any easier.  HOWEVER, make sure you do not have both of them set at the same time in your XAML.  Because if you do use them both you will be left to wonder why your TemplateSelector code is NOT working, but your provided style is.

As far as I can tell the ItemTemplate trumps the ItemTemplateSelector and your selector will NEVER get executed.

You will want to either use just the ItemTemplate OR use the ItemTemplateSelector.

Hope this helps.

Till next time,


Posted 05-04-2012 12:56 PM by Derik Whittaker
Filed under: ,

[Advertisement]

About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Subscribe
Google Reader or Homepage

del.icio.us CodeBetter.com Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl CodeBetter.com Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of Devlicio.us
Red-Gate Tools For SQL and .NET

NDepend

SlickEdit
 
SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
LiteAccounting.Com
DevExpress
Fixx
NHibernate Profiler
Unfuddle
Balsamiq Mockups
Scrumy
JetBrains - ReSharper
Umbraco
NServiceBus
RavenDb
Web Sequence Diagrams
Ducksboard<-- NEW Friend!

 



Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers

 

Community Server (Commercial Edition)