FrameworkElement.OnApplyTemplate Method
Assembly: PresentationFramework (in presentationframework.dll)
This method has no default implementation.
Templates are the section of an element's completed visual tree that comes from the Template property of a Style that is applied for the element. For more information, see Styles Overview.
Notes to Inheritors: Derived classes of FrameworkElement can use this method as a notification for a variety of possible scenarios:-
You can call your own implementation of code that builds the remainder of an element visual tree.
-
You can run code that relies on the visual tree from templates having been applied, such as obtaining references to named elements that came from a template.
-
You can introduce services that only make sense to exist after the visual tree from templates is complete.
-
You can set states and properties of elements within the template that are dependent on other factors. For instance, property values might only be discoverable by knowing the parent element, or when a specific derived class uses a common template.
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.