Skip to content

Restyling Through Code

Roman Shapiro edited this page Jul 14, 2018 · 9 revisions

Restyling through code is easy. There's a static object Stylesheet.Current that handles all default widget styles.
I.e. following code will make all textblocks green:

  Stylesheet.Current.TextBlockStyle.TextColor = Color.Green;

Note. Default style is being applied to the widget in the moment of the creation. Therefore all changes to Stylesheet.Current before UI is created.