Skip to content

ControlTemplate.RebuildOnThemeChange property

Gets whether an applied tree is discarded and built again when the theme changes. Set it for a build that reads theme values into the tree instead of leaving them to styles and bindings.

public bool RebuildOnThemeChange { get; set; }

A rebuild replaces every part, so what a part held (text being edited, scroll offset, focus) is lost. The default keeps the tree.