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

WPF Theme breaks binding

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Gabriele
Top achievements
Rank 1
Gabriele asked on 12 Feb 2014, 10:27 AM
Hello, I'm working on a WPF application that contains several controls, including a RadDiagram. On some RadDiagramShape I applied a style which refer a DataTemplate, defined as follows:

<DataTemplate x:Key="AttributeContentTemplate">
            <Grid>
                <Canvas ClipToBounds="False">
                    <TextBlock  Text="{Binding Name}" 
                               FontWeight="{Binding IsBoldText,Converter={StaticResource FontWeightBooleanConverter}}"
                               FontStyle="{Binding IsItalicText,Converter={StaticResource FontStyleBooleanConverter}}">                       
                    </TextBlock>
                </Canvas>
            </Grid>
        </DataTemplate>

Every binding worked properly until I applied an ApplicationTheme after main form initialization using StyleManager: 

StyleManager.ApplicationTheme = new Windows8Theme();

after that FontWeight and FontStyle bindings won't work, even if I set those bindings in code.

how I can fix it?





1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 17 Feb 2014, 10:36 AM
Hi Gabriele,

I couldn't reproduce the described issue, but I prepared a sample project which you could use as a base for your requirement. Or you could modify it to reproduce the issue and send it back. Please let me know if I am missing anything.

However, note that it is better to take advantage of the implicit styling mechanism instead of using the StyleManager.

Regards,
Martin
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
General Discussions
Asked by
Gabriele
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or