Metro and ItemTemplateSelector

3 posts, 0 answers
  1. Aleks
    Aleks avatar
    4 posts
    Member since:
    Nov 2011

    Posted 07 Mar 2012 Link to this post

    Hello,

    I appologise if this has been asked before, but my search yielded no results.

    In my application I have a ListBox which has a basic ItemTemplateSelector. This works perfectly fine without any themes, and with Summer theme, but it no longer works when the Metro theme is applied. The Template Selector does not get fired at all. I have narrowed the issue down to the following line of code in my resource dictionary:

    <Style TargetType="{x:Type ListBoxItem}">
         <Setter Property="telerik:StyleManager.Theme" Value="Metro"/>
    </Style>

    If I take the Style out, or change it to Summer theme, everything works fine. The issue seems to lie with the Metro theme, but I can not narrow down the issue any further. I have not posted the Tempate Selector code since it works with other themes, therefore I do not think that is where the issue lies. If you want me to post that code as well, please let me know.

    VS2010
    .NET 4.0
    Telerik v2011.3.1220.40

    Thank you,
    Aleks
  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 12 Mar 2012 Link to this post

    Hi Aleksandar,

    Can you share where exactly your style is placed? Are you applying it as a simple static resource, or through a StyleSelector?

    I tested your scenario with a very straighforward project and it worked as expected. If you could provide a testable project replicating your scenario, it would be very helpful.

    All the best,
    Dani
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. Aleks
    Aleks avatar
    4 posts
    Member since:
    Nov 2011

    Posted 12 Mar 2012 Link to this post

    Hello Dani,

    I have submitted a support ticket with a sample report attached.
Back to Top