Adding a Merged Dictionary to a Merged Dictionary

后端 未结 3 1624
灰色年华
灰色年华 2020-12-03 01:19

I can\'t seem to be able to add a merged dictionary to a collection of merged dictionaries within XAML.

Theme.xaml



        
3条回答
  •  天命终不由人
    2020-12-03 02:16

    If this is happening on one of your own controls I've found that another solution is setting the DefaultStyleKey property to null:

    DefaultStyleKeyProperty.OverrideMetadata(typeof(MyControl), new FrameworkPropertyMetadata(null));
    

    I have no idea why this works, but it seems to!

提交回复
热议问题