Skip to content

ControlTemplate.RebuildOnDpiChange property

Gets whether an applied tree is discarded and built again when the DPI changes. Set it for a build that computes device-pixel-snapped sizes into the tree.

public bool RebuildOnDpiChange { 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.