Accessing static fields in XAML

Use x:Static markup extension

<ResoureDictionary ...
  xmlns:local="clr-namespace:Namespace.Where.Your.BaseThingy.Class.Is.Defined"
>
  <Style BasedOn="{x:Static local:BaseThingy.BaseStyle}" TargetType="BaseThingy" />
</ResourceDictionary>

Leave a Comment