wpf - Apply styles to a UserControl from within its own Xaml -
is there way apply styles (specifically style data triggers) usercontrol
within it's own xaml code?
you cannot access style in xaml within usercontrol's resources - have few options tho:
- set in coding in constructor through
style = findresource(<name>) style
- set in parent control
<local:myusercontrol style="{staticresource mystyle}"
- put style in visual control's resources-property 'up-the-chain' empty key , targettype="{x:type myusercontrol}"
hope helps.
Comments
Post a Comment