xaml - "inherit" style of theme in wpf -


I am using a theme in CodePlex and I want to add some modifications to the style but do not want to change their code. Am How do I get a theme style?

 & lt; Style x: key = "style1" & gt; & Lt; Setter property = "control.background" value = "yellow" /> & Lt; / Style & gt; & Lt; Style x: key = "style2" based on = "{StaticResource Style1}" & gt; & Lt; Setter Property = "Control.Foreground" Value = "Blue" /> & Lt; / Style & gt; 

MSDN Reference:

Another example (a style based on a style with no clear key):

 & lt; Style x: key = "Style3" basedOn = "{static resource {x: type combo box}}" & gt; & Lt; Setter Property = "Control.Foreground" Value = "Blue" /> & Lt; / Style & gt; 

Just load the extension resource dictionary after the base resource dictionary via xml or code.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -