콘텐츠로 이동

ControlTemplate class

이 콘텐츠는 아직 번역되지 않았습니다.

A reusable definition of a control’s visual tree. One definition can be applied to any number of controls; each application builds an independent tree.

Guide: C# Markup guide

public abstract class ControlTemplate
name description
RebuildOnDpiChange { get; set; } 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.
RebuildOnThemeChange { get; set; } 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.
abstract Build(…) Builds the visual tree for one control instance, registering named parts into context, and returns the visual root.