M
moondaddy
I have a WPF windows app and from code in Window.xaml.cs I create an
instance of a class whish is derived from Adorner. In this class I create
shapes and need to apply a style from a resource file named
'Dictionary1.xaml'.
Normally if all this code was just running in Window.xaml.cs I could use
this line:
cornerThumb.Style = (Style)this.FindResource("RoundThumbLineEnd");
and use this reference in the window's xaml:
<Window.Resources>
<ResourceDictionary Source="Dictionary1.xaml" />
</Window.Resources>
but of course, the Adorner class where I'm working has no idea where
Dictionary1.xaml is.
Any tips?
Thanks.
instance of a class whish is derived from Adorner. In this class I create
shapes and need to apply a style from a resource file named
'Dictionary1.xaml'.
Normally if all this code was just running in Window.xaml.cs I could use
this line:
cornerThumb.Style = (Style)this.FindResource("RoundThumbLineEnd");
and use this reference in the window's xaml:
<Window.Resources>
<ResourceDictionary Source="Dictionary1.xaml" />
</Window.Resources>
but of course, the Adorner class where I'm working has no idea where
Dictionary1.xaml is.
Any tips?
Thanks.