Card Class
A container to group related information for a single subject.
[TemplatePart(Name = "PART_ContentPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_CoverPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_FooterPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_HeaderPresenter", Type = typeof(ContentPresenter))]
[TemplatePart(Name = "PART_ThumbnailPresenter", Type = typeof(ContentPresenter))]
public class Card : Button
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl ButtonBase Button object
Constructors
Card()
Initializes a new instance of the class.
public Card()
Properties
Badge
Gets or sets a Badge control to adorn the card.
BadgeHorizontalAlignment
Gets or sets the horizontal alignment of the Badge adornment.
public AdornmentHorizontalAlignment BadgeHorizontalAlignment { get; set; }
Property Value
See Also
BadgeHorizontalOffset
Gets or sets the horizontal offset of the Badge adornment.
public double BadgeHorizontalOffset { get; set; }
Property Value
See Also
BadgeVerticalAlignment
Gets or sets the vertical alignment of the Badge adornment.
public AdornmentVerticalAlignment BadgeVerticalAlignment { get; set; }
Property Value
See Also
BadgeVerticalOffset
Gets or sets the vertical offset of the Badge adornment.
public double BadgeVerticalOffset { get; set; }
Property Value
See Also
CornerRadius
Gets or sets the CornerRadius applied to the control.
Cover
Gets or sets the content for the cover.
CoverDock
Gets or sets the dock location for the cover.
CoverTemplate
Gets or sets the template used to display the Cover.
CoverTemplateSelector
Gets or sets the DataTemplateSelector to use for the Cover.
public DataTemplateSelector CoverTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for the Cover.
Description
Gets or sets the description associated with the card which, by default, may be used to populate the header.
DescriptionStyle
Gets or sets the Style applied to the description.
Footer
Gets or sets the content for the footer.
FooterBackground
Gets or sets the brush used for the background of the footer.
FooterBorderBrush
Gets or sets the brush used for the border of the footer.
FooterBorderThickness
Gets or sets the thickness of footer border.
FooterForeground
Gets or sets the brush used for the foreground of the footer.
FooterTemplate
Gets or sets the template used to display the Footer.
FooterTemplateSelector
Gets or sets the DataTemplateSelector to use for the Footer.
public DataTemplateSelector FooterTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for the Footer.
HasFooterSeparation
Indicates whether there is separation between the footer content area and the content area above it.
HasHeaderContent
Indicates whether Header has a non-null value.
HasHeaderSeparation
Indicates whether there is separation between the header content area and the content area below it.
Header
Gets or sets the content for the header.
HeaderBackground
Gets or sets the brush used for the background of the header.
HeaderBorderBrush
Gets or sets the brush used for the border of the header.
HeaderBorderThickness
Gets or The thickness of header border.
HeaderForeground
Gets or sets the brush used for the foreground of the header.
HeaderTemplate
Gets or sets the template used to display the Header.
HeaderTemplateSelector
Gets or sets the DataTemplateSelector to use for the Header.
public DataTemplateSelector HeaderTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for the Header.
IsAnimationEnabled
Gets or sets whether animations are enabled for an element, when supported.
public bool IsAnimationEnabled { get; set; }
Property Value
- bool:
true
if animations are enabled; otherwise,false
. The default value istrue
.
IsClickEnabled
Gets or sets 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.
The default value is false
.
IsCoverVisible
Gets or sets if the cover is visible.
public bool? IsCoverVisible { get; set; }
Property Value
- bool?:
true
to force the cover to be visible,false
to force the cover to be hidden, ornull
to show the cover only when cover content is available. The default value isnull
.
IsFooterVisible
Gets or sets if the footer is visible.
public bool? IsFooterVisible { get; set; }
Property Value
- bool?:
true
to force the footer to be visible,false
to force the footer to be hidden, ornull
to show the footer only when footer content is available. The default value isnull
.
IsHeaderVisible
Gets or sets 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
.
IsShadowEnabled
Gets or sets whether the shadow can be rendered by the chrome.
public bool IsShadowEnabled { get; set; }
Property Value
- bool:
true
if the shadow can be rendered by the chrome; otherwise,false
. The default value istrue
.
Remarks
Set this property to false
to prevent the shadow from rendering.
IsThumbnailVisible
Gets or sets if the thumbnail is visible.
public bool? IsThumbnailVisible { get; set; }
Property Value
- bool?:
true
to force the thumbnail to be visible,false
to force the thumbnail to be hidden, ornull
to show the thumbnail only when thumbnail content is available. The default value isnull
.
ShadowOpacity
Gets or sets the opacity of the shadow.
public double ShadowOpacity { get; set; }
Property Value
- double:
The opacity of the shadow, a value from
0
to1
. The default value is0.3
.
Thumbnail
Gets or sets the content for the thumbnail.
ThumbnailStyle
Gets or sets the Style applied to the thumbnail.
ThumbnailTemplate
Gets or sets the template used to display the Thumbnail.
ThumbnailTemplateSelector
Gets or sets the DataTemplateSelector to use for the Thumbnail.
public DataTemplateSelector ThumbnailTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The DataTemplateSelector to use for the Thumbnail.
Title
Gets or sets the title associated with the card which, by default, may be used to populate the header.
TitleStyle
Gets or sets the Style applied to the title.
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.
ToString()
Returns the string representation of this object.
Fields
BadgeHorizontalAlignmentProperty
Identifies the BadgeHorizontalAlignment dependency property.
public static readonly DependencyProperty BadgeHorizontalAlignmentProperty
BadgeHorizontalOffsetProperty
Identifies the BadgeHorizontalOffset dependency property.
public static readonly DependencyProperty BadgeHorizontalOffsetProperty
BadgeProperty
Identifies the Badge dependency property.
public static readonly DependencyProperty BadgeProperty
BadgeVerticalAlignmentProperty
Identifies the BadgeVerticalAlignment dependency property.
public static readonly DependencyProperty BadgeVerticalAlignmentProperty
BadgeVerticalOffsetProperty
Identifies the BadgeVerticalOffset dependency property.
public static readonly DependencyProperty BadgeVerticalOffsetProperty
CornerRadiusProperty
Identifies the CornerRadius dependency property.
public static readonly DependencyProperty CornerRadiusProperty
CoverDockProperty
Identifies the CoverDock dependency property.
public static readonly DependencyProperty CoverDockProperty
CoverProperty
Identifies the Cover dependency property.
public static readonly DependencyProperty CoverProperty
CoverTemplateProperty
Identifies the CoverTemplate dependency property.
public static readonly DependencyProperty CoverTemplateProperty
CoverTemplateSelectorProperty
Identifies the CoverTemplateSelector dependency property.
public static readonly DependencyProperty CoverTemplateSelectorProperty
DescriptionProperty
Identifies the Description dependency property.
public static readonly DependencyProperty DescriptionProperty
DescriptionStyleProperty
Identifies the DescriptionStyle dependency property.
public static readonly DependencyProperty DescriptionStyleProperty
FooterBackgroundProperty
Identifies the FooterBackground dependency property.
public static readonly DependencyProperty FooterBackgroundProperty
FooterBorderBrushProperty
Identifies the FooterBorderBrush dependency property.
public static readonly DependencyProperty FooterBorderBrushProperty
FooterBorderThicknessProperty
Identifies the FooterBorderThickness dependency property.
public static readonly DependencyProperty FooterBorderThicknessProperty
FooterForegroundProperty
Identifies the FooterForeground dependency property.
public static readonly DependencyProperty FooterForegroundProperty
FooterProperty
Identifies the Footer dependency property.
public static readonly DependencyProperty FooterProperty
FooterTemplateProperty
Identifies the FooterTemplate dependency property.
public static readonly DependencyProperty FooterTemplateProperty
FooterTemplateSelectorProperty
Identifies the FooterTemplateSelector dependency property.
public static readonly DependencyProperty FooterTemplateSelectorProperty
HasFooterSeparationProperty
Identifies the read-only HasFooterSeparation dependency property.
public static readonly DependencyProperty HasFooterSeparationProperty
HasHeaderContentProperty
Identifies the read-only HasHeaderContent dependency property.
public static readonly DependencyProperty HasHeaderContentProperty
HasHeaderSeparationProperty
Identifies the read-only HasHeaderSeparation dependency property.
public static readonly DependencyProperty HasHeaderSeparationProperty
HeaderBackgroundProperty
Identifies the HeaderBackground dependency property.
public static readonly DependencyProperty HeaderBackgroundProperty
HeaderBorderBrushProperty
Identifies the HeaderBorderBrush dependency property.
public static readonly DependencyProperty HeaderBorderBrushProperty
HeaderBorderThicknessProperty
Identifies the HeaderBorderThickness dependency property.
public static readonly DependencyProperty HeaderBorderThicknessProperty
HeaderForegroundProperty
Identifies the HeaderForeground dependency property.
public static readonly DependencyProperty HeaderForegroundProperty
HeaderProperty
Identifies the Header dependency property.
public static readonly DependencyProperty HeaderProperty
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property.
public static readonly DependencyProperty HeaderTemplateProperty
HeaderTemplateSelectorProperty
Identifies the HeaderTemplateSelector dependency property.
public static readonly DependencyProperty HeaderTemplateSelectorProperty
IsAnimationEnabledProperty
Identifies the IsAnimationEnabled dependency property.
public static readonly DependencyProperty IsAnimationEnabledProperty
IsClickEnabledProperty
Identifies the IsClickEnabled depedency property.
public static readonly DependencyProperty IsClickEnabledProperty
IsCoverVisibleProperty
Identifies the IsCoverVisible dependency property.
public static readonly DependencyProperty IsCoverVisibleProperty
IsFooterVisibleProperty
Identifies the IsFooterVisible dependency property.
public static readonly DependencyProperty IsFooterVisibleProperty
IsHeaderVisibleProperty
Identifies the IsHeaderVisible dependency property.
public static readonly DependencyProperty IsHeaderVisibleProperty
IsShadowEnabledProperty
Identifies the IsShadowEnabled dependency property.
public static readonly DependencyProperty IsShadowEnabledProperty
IsThumbnailVisibleProperty
Identifies the IsThumbnailVisible dependency property.
public static readonly DependencyProperty IsThumbnailVisibleProperty
ShadowOpacityProperty
Identifies the ShadowOpacity dependency property.
public static readonly DependencyProperty ShadowOpacityProperty
ThumbnailProperty
Identifies the Thumbnail dependency property.
public static readonly DependencyProperty ThumbnailProperty
ThumbnailStyleProperty
Identifies the ThumbnailStyle dependency property.
public static readonly DependencyProperty ThumbnailStyleProperty
ThumbnailTemplateProperty
Identifies the ThumbnailTemplate dependency property.
public static readonly DependencyProperty ThumbnailTemplateProperty
ThumbnailTemplateSelectorProperty
Identifies the ThumbnailTemplateSelector dependency property.
public static readonly DependencyProperty ThumbnailTemplateSelectorProperty
TitleProperty
Identifies the Title dependency property.
public static readonly DependencyProperty TitleProperty
TitleStyleProperty
Identifies the TitleStyle dependency property.
public static readonly DependencyProperty TitleStyleProperty