Represents the base class for user interface (UI) elements that use a ControlTemplate to define their appearance.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
The class is the base class for many of the controls you add to an application. The class defines very little behavior; while it is possible to add a to your application, it is far more common to add a control that inherits from , such as a Button or ListBox.
The Template property, which is a ControlTemplate, specifies the appearance of the . If you want to change the appearance of a control but retain its functionality, you should consider creating a new ControlTemplate instead of creating a new class. For more information, see Styling and Templating.
If you want to create a control with custom behavior as well as allow others to customize its appearance, your control can inherit from the class and define a ControlTemplate. If you want to extend the behavior of an existing control, you can inherit from a class that inherits from .
A common way to use these properties is to bind an element in the ControlTemplate to the property. For example, if you want your control to change color according to the value of the Background property, you can bind some property of an element in the ControlTemplate to the Background. Use the TemplateBinding Markup Extension to bind properties on a control to an element in the ControlTemplate.
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.