SettingsCard Class
Displays a setting within a card.
[TemplatePart(Name = "PART_ActionIconPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_ContentPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_DescriptionPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_HeaderPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_HeaderIconPresenter", Type = typeof(ContentPresenter))]
public class SettingsCard : Button
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl ButtonBase Button object
Constructors
SettingsCard()
Initializes an instance of the class.
public SettingsCard()
Properties
ActionIcon
The content for the action icon.
ActionIconTemplate
The template used to display the ActionIcon.
ActionIconTemplateSelector
The DataTemplateSelector to use for ActionIcon.
public DataTemplateSelector? ActionIconTemplateSelector { get; set; }
Property Value
CornerRadius
The corner radius of the element.
Description
The setting description.
DescriptionTemplate
The template used to display the Description.
DescriptionTemplateSelector
The DataTemplateSelector to use for Description.
public DataTemplateSelector? DescriptionTemplateSelector { get; set; }
Property Value
Header
The content for the header.
HeaderIcon
The content for the header icon.
HeaderIconTemplate
The template used to display the HeaderIcon.
HeaderIconTemplateSelector
The DataTemplateSelector to use for HeaderIcon.
public DataTemplateSelector? HeaderIconTemplateSelector { get; set; }
Property Value
HeaderTemplate
The template used to display the Header.
HeaderTemplateSelector
The DataTemplateSelector to use for Header.
public DataTemplateSelector? HeaderTemplateSelector { get; set; }
Property Value
IsActionIconVisible
Indicates if the action icon is visible.
public bool? IsActionIconVisible { get; set; }
Property Value
- bool?:
trueto force the icon to be visible,falseto force the icon to be hidden, ornullto show the icon only when icon content is available. The default value isnull.
IsClickEnabled
Indicates if clicking the card is enabled.
public bool IsClickEnabled { get; set; }
Property Value
Remarks
This property is always true when a Command is assigned to the card.
IsDescriptionVisible
Indicates if the description is visible.
public bool? IsDescriptionVisible { get; set; }
Property Value
- bool?:
trueto force the description to be visible,falseto force the description to be hidden, ornullto show the description only when description content is available. The default value isnull.
IsHeaderIconVisible
Indicates if the header icon is visible.
public bool? IsHeaderIconVisible { get; set; }
Property Value
- bool?:
trueto force the icon to be visible,falseto force the icon to be hidden, ornullto show the icon only when icon content is available. The default value isnull.
IsHeaderVisible
Indicates if the header is visible.
public bool? IsHeaderVisible { get; set; }
Property Value
- bool?:
trueto force the header to be visible,falseto force the header to be hidden, ornullto show the header only when header content is available. The default value isnull.
IsWrapped
Indicates if the content is wrapped.
public bool? IsWrapped { get; set; }
Property Value
- bool?:
trueto force the content to be wrapped,falseto prevent the content from being wrapped,nullto wrap the content only when the card's width is below a certain threshold. The default value isnull.
WrapThreshold
The width threshold at which the card will be wrapped.
public double WrapThreshold { get; set; }
Property Value
Remarks
The card will be wrapped when the width is less than or equal to the configured threshold.
Methods
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnClick()
Called when a Button is clicked.
protected override void OnClick()
OnCreateAutomationPeer()
Creates an appropriate ButtonAutomationPeer for this control as part of the WPF infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
A ButtonAutomationPeer for this control.
OnKeyDown(KeyEventArgs)
Provides class handling for the KeyDown routed event that occurs when the user presses a key while this control has focus.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
OnKeyUp(KeyEventArgs)
Provides class handling for the KeyUp routed event that occurs when the user releases a key while this control has focus.
protected override void OnKeyUp(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data for the KeyUp event. |
OnRenderSizeChanged(SizeChangedInfo)
Called when the rendered size of a control changes.
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
| Parameter | Type | Description |
|---|---|---|
| sizeInfo | SizeChangedInfo | Specifies the size changes. |
ToString()
Returns the string representation of this object.
Fields
ActionIconProperty
Defines the ActionIcon property.
public static readonly DependencyProperty ActionIconProperty
ActionIconTemplateProperty
Defines the ActionIconTemplate property.
public static readonly DependencyProperty ActionIconTemplateProperty
ActionIconTemplateSelectorProperty
Defines the ActionIconTemplateSelector property.
public static readonly DependencyProperty ActionIconTemplateSelectorProperty
CornerRadiusProperty
Defines the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
DescriptionProperty
Defines the Description property.
public static readonly DependencyProperty DescriptionProperty
DescriptionTemplateProperty
Defines the DescriptionTemplate property.
public static readonly DependencyProperty DescriptionTemplateProperty
DescriptionTemplateSelectorProperty
Defines the DescriptionTemplateSelector property.
public static readonly DependencyProperty DescriptionTemplateSelectorProperty
HeaderIconProperty
Defines the HeaderIcon property.
public static readonly DependencyProperty HeaderIconProperty
HeaderIconTemplateProperty
Defines the HeaderIconTemplate property.
public static readonly DependencyProperty HeaderIconTemplateProperty
HeaderIconTemplateSelectorProperty
Defines the HeaderIconTemplateSelector property.
public static readonly DependencyProperty HeaderIconTemplateSelectorProperty
HeaderProperty
Defines the Header property.
public static readonly DependencyProperty HeaderProperty
HeaderTemplateProperty
Defines the HeaderTemplate property.
public static readonly DependencyProperty HeaderTemplateProperty
HeaderTemplateSelectorProperty
Defines the HeaderTemplateSelector property.
public static readonly DependencyProperty HeaderTemplateSelectorProperty
IsActionIconVisibleProperty
Defines the IsActionIconVisible property.
public static readonly DependencyProperty IsActionIconVisibleProperty
IsClickEnabledProperty
Defines the IsClickEnabled property.
public static readonly DependencyProperty IsClickEnabledProperty
IsDescriptionVisibleProperty
Defines the IsDescriptionVisible property.
public static readonly DependencyProperty IsDescriptionVisibleProperty
IsHeaderIconVisibleProperty
Defines the IsHeaderIconVisible property.
public static readonly DependencyProperty IsHeaderIconVisibleProperty
IsHeaderVisibleProperty
Defines the IsHeaderVisible property.
public static readonly DependencyProperty IsHeaderVisibleProperty
IsWrappedProperty
Defines the IsWrapped property.
public static readonly DependencyProperty IsWrappedProperty
WrapThresholdProperty
Defines the WrapThreshold property.
public static readonly DependencyProperty WrapThresholdProperty