wpf - How can I define and use a variable in XAML to define a color? -
I have a number of elements in the XAML that defines Foreground = "# 555" Color of fade text in a readable text box for How can I assume I can put in a XAML variable and I can refer to each attribute so I'll have to change it in one place? I'm thinking you can do something like this : and property
& lt; Sys: string x: main = "ReadOnlyTextColor" & gt; # 555 & lt; / Sys: string & gt; ... & lt; Text box foreground = "{static resource readline text file"} />
xmlns: sys = ...
What will be the context for this?
Try to define your colors as a: ... < Code> & lt; SolidColorBrush x: key = "ReadOnlyTextBrush" color = "# 555555" />
& lt; Text box foreground = "{static resource readline text file}" />