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 a new instance of the class.
public SettingsCard()
Properties
ActionIcon
The content for the action icon.
ActionIconTemplate
The template used to display the ActionIcon.
ActionIconTemplateSelector
Gets or sets the DataTemplateSelector to use for ActionIcon.
public DataTemplateSelector ActionIconTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for ActionIcon.
CornerRadius
The corner radius of the element.
Description
The setting description.
DescriptionTemplate
The template used to display the Description.
DescriptionTemplateSelector
Gets or sets the DataTemplateSelector to use for Description.
public DataTemplateSelector DescriptionTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for Description.
Header
The content for the header.
HeaderIcon
The content for the header icon.
HeaderIconTemplate
The template used to display the HeaderIcon.
HeaderIconTemplateSelector
Gets or sets the DataTemplateSelector to use for HeaderIcon.
public DataTemplateSelector HeaderIconTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for HeaderIcon.
HeaderTemplate
The template used to display the Header.
HeaderTemplateSelector
Gets or sets the DataTemplateSelector to use for Header.
public DataTemplateSelector HeaderTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for Header.
IsActionIconVisible
Indicates if the action icon is visible.
public bool? IsActionIconVisible { get; set; }
Property Value
- bool?:
true
to force the icon to be visible,false
to force the icon to be hidden, ornull
to 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?:
true
to force the description to be visible,false
to force the description to be hidden, ornull
to 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?:
true
to force the icon to be visible,false
to force the icon to be hidden, ornull
to 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?:
true
to force the header to be visible,false
to force the header to be hidden, ornull
to 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?:
true
to force the content to be wrapped,false
to prevent the content from being wrapped,null
to 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
Identifies the ActionIcon dependency property.
public static readonly DependencyProperty ActionIconProperty
ActionIconTemplateProperty
Identifies the ActionIconTemplate depedency property.
public static readonly DependencyProperty ActionIconTemplateProperty
ActionIconTemplateSelectorProperty
Identifies the ActionIconTemplateSelector dependency property.
public static readonly DependencyProperty ActionIconTemplateSelectorProperty
CornerRadiusProperty
Identifies the CornerRadius dependency property.
public static readonly DependencyProperty CornerRadiusProperty
DescriptionProperty
Identifies the Description depedency property.
public static readonly DependencyProperty DescriptionProperty
DescriptionTemplateProperty
Identifies the DescriptionTemplate depedency property.
public static readonly DependencyProperty DescriptionTemplateProperty
DescriptionTemplateSelectorProperty
Identifies the DescriptionTemplateSelector dependency property.
public static readonly DependencyProperty DescriptionTemplateSelectorProperty
HeaderIconProperty
Identifies the HeaderIcon dependency property.
public static readonly DependencyProperty HeaderIconProperty
HeaderIconTemplateProperty
Identifies the HeaderIconTemplate depedency property.
public static readonly DependencyProperty HeaderIconTemplateProperty
HeaderIconTemplateSelectorProperty
Identifies the HeaderIconTemplateSelector dependency property.
public static readonly DependencyProperty HeaderIconTemplateSelectorProperty
HeaderProperty
Identifies the Header dependency property.
public static readonly DependencyProperty HeaderProperty
HeaderTemplateProperty
Identifies the HeaderTemplate depedency property.
public static readonly DependencyProperty HeaderTemplateProperty
HeaderTemplateSelectorProperty
Identifies the HeaderTemplateSelector dependency property.
public static readonly DependencyProperty HeaderTemplateSelectorProperty
IsActionIconVisibleProperty
Identifies the IsActionIconVisible depedency property.
public static readonly DependencyProperty IsActionIconVisibleProperty
IsClickEnabledProperty
Identifies the IsClickEnabled depedency property.
public static readonly DependencyProperty IsClickEnabledProperty
IsDescriptionVisibleProperty
Identifies the IsDescriptionVisible depedency property.
public static readonly DependencyProperty IsDescriptionVisibleProperty
IsHeaderIconVisibleProperty
Identifies the IsHeaderIconVisible depedency property.
public static readonly DependencyProperty IsHeaderIconVisibleProperty
IsHeaderVisibleProperty
Identifies the IsHeaderVisible depedency property.
public static readonly DependencyProperty IsHeaderVisibleProperty
IsWrappedProperty
Identifies the IsWrapped depedency property.
public static readonly DependencyProperty IsWrappedProperty
WrapThresholdProperty
Identifies the WrapThreshold depedency property.
public static readonly DependencyProperty WrapThresholdProperty