Skip to content

TemplateContext.Register<T> method

Names an element for later Get. Names are unique within one context and outlive Reset, so register once from the build step.

public void Register<T>(string name, T element)
where T : UIElement
exception condition
InvalidOperationException An element is already registered under that name.