This is a migrated thread and some comments may be shown as answers.

Metro and ItemTemplateSelector

2 Answers 66 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Aleks
Top achievements
Rank 1
Aleks asked on 07 Mar 2012, 04:08 PM
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 Answers, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 12 Mar 2012, 01:06 PM
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 >>
0
Aleks
Top achievements
Rank 1
answered on 12 Mar 2012, 01:50 PM
Hello Dani,

I have submitted a support ticket with a sample report attached.
Tags
General Discussions
Asked by
Aleks
Top achievements
Rank 1
Answers by
Dani
Telerik team
Aleks
Top achievements
Rank 1
Share this question
or