WPF Theme breaks binding

2 posts, 0 answers
  1. Gabriele
    Gabriele avatar
    1 posts
    Member since:
    Feb 2014

    Posted 12 Feb 2014 Link to this post

    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">
                    <Canvas ClipToBounds="False">
                        <TextBlock  Text="{Binding Name}" 
                                   FontWeight="{Binding IsBoldText,Converter={StaticResource FontWeightBooleanConverter}}"
                                   FontStyle="{Binding IsItalicText,Converter={StaticResource FontStyleBooleanConverter}}">                       

    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?

  2. Martin Ivanov
    Martin Ivanov avatar
    1452 posts

    Posted 17 Feb 2014 Link to this post

    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.


    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).

Back to Top