Class ButtonChrome
Creates a theme-specific look for Button elements.
Inheritance
Implements
Inherited Members
Namespace: PresentationTheme.AeroLite.Win10
Assembly: PresentationTheme.AeroLite.Win10.dll
Syntax
[TemplateVisualState(GroupName = "CommonStates", Name = "Normal")]
[TemplateVisualState(GroupName = "CommonStates", Name = "Disabled")]
[TemplateVisualState(GroupName = "CommonStates", Name = "Hot")]
[TemplateVisualState(GroupName = "CommonStates", Name = "Pressed")]
[TemplateVisualState(GroupName = "CommonStates", Name = "Defaulted")]
public class ButtonChrome : ContentControl, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IAddChild
Remarks
The actual appearance of a Button is dependent on which theme is active on the user's system. The properties of this class allow WPF to set the appearance based on the current theme.
ButtonChrome does not actually render a button but instead provides visual states allowing its Template to accurately render the appearance of buttons.
Fields
| Improve this Doc View SourceRenderDefaultedProperty
Identifies the RenderDefaulted dependency property.
Declaration
public static readonly DependencyProperty RenderDefaultedProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RenderEnabledProperty
Identifies the RenderEnabled dependency property.
Declaration
public static readonly DependencyProperty RenderEnabledProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RenderFocusedProperty
Identifies the RenderFocused dependency property.
Declaration
public static readonly DependencyProperty RenderFocusedProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RenderHotProperty
Identifies the RenderHot dependency property.
Declaration
public static readonly DependencyProperty RenderHotProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RenderPressedProperty
Identifies the RenderPressed dependency property.
Declaration
public static readonly DependencyProperty RenderPressedProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceRenderDefaulted
Gets or sets whether the button chrome shows a defaulted state.
Declaration
public bool RenderDefaulted { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if the button chrome appears defauled; otherwise false. |
Remarks
Dependency Property Information
Identifier field | RenderDefaultedProperty |
Metadata properties set to true | None |
RenderEnabled
Gets or sets a value indicating whether the button chrome should render an enabled state.
Declaration
public bool RenderEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if the button chrome appears enabled; otherwise false. |
Remarks
Dependency Property Information
Identifier field | RenderEnabledProperty |
Metadata properties set to true | None |
RenderFocused
Gets or sets a value indicating whether the button chrome shows a focused state.
Declaration
public bool RenderFocused { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if the button chrome appears focused; otherwise false. |
Remarks
Dependency Property Information
Identifier field | RenderFocusedProperty |
Metadata properties set to true | None |
RenderHot
Gets or sets a value indicating whether the button chrome should render a hot state (i.e., as if the mouse is over it).
Declaration
public bool RenderHot { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if the button chrome appears as if the mouse is over it; otherwise false. |
Remarks
Dependency Property Information
Identifier field | RenderHotProperty |
Metadata properties set to true | None |
RenderPressed
Gets or sets a value indicating whether the button chrome should render a pressed state.
Declaration
public bool RenderPressed { get; set; }
Property Value
Type | Description |
---|---|
Boolean | true if the button chrome appears pressed; otherwise false. |
Remarks
Dependency Property Information
Identifier field | RenderPressedProperty |
Metadata properties set to true | None |
Methods
| Improve this Doc View SourceChangeVisualState(Boolean)
Changes the visual state of the button chrome.
Declaration
protected virtual void ChangeVisualState(bool useTransitions)
Parameters
Type | Name | Description |
---|---|---|
Boolean | useTransitions | true to use a VisualTransition object to transition between states; otherwise false. |
See Also
| Improve this Doc View SourceOnApplyTemplate()
Declaration
public override void OnApplyTemplate()