Skip to end of metadata
Go to start of metadata

Remarks

StylishLabel is inherited from ISContentControl, which means that it can contain a single object of any types, such as a string, an image, or a panel. For more information about this content model, see Content Model Overview.

StylishLabel supports ImageContent model concept which provides capability to efficiently specify the Image and Content through properties. To learn more about ImageContent model, see Content Model Overview.

Definition

public class StylishLabel : ISContentControl

Summary

The following table summarizes the members exposed in this class.

Public Constructors

StylishLabel Constructor()Initializes a new instance of the StylishLabel class.

Public Properties

ComputedImageMarginInternal use.
ContentEffectGets or sets the pixel shader effect to use for rendering the text element.
ContentTypeGets or sets the content type of Stylish Label.
DisplayTextGets or sets the display text.
DisplayTextPathGets or sets the display text path.
HorizontalImageAlignmentGets or sets the horizontal alignment of the image element.
ImageHeightGets or sets the height of the image.
ImageMarginGets or sets the margin of the image.
ImageSourceGets or sets the source for the image.
ImageStretchGets or sets a value that describes how an Image should be stretched to fill the destination rectangle.
ImageWidthGets or sets the width of the image.
RootElementGets the root element.
TextImageRelationGets or sets the position of the text and image relative to each other on a control.
VerticalImageAlignmentGets or sets the vertical alignment of the image element.

Protected Properties

ProductProduct Info.

Fields

ComputedImageMarginPropertyIdentifies the ComputedImageMargin dependency property.
ContentEffectPropertyIdentifies the ContentEffect dependency property.
ContentTypePropertyIdentifies the ContentType dependency property.
DisplayTextPathPropertyIdentifies the DisplayText dependency property.
DisplayTextPropertyIdentifies the DisplayText dependency property.
HorizontalImageAlignmentPropertyIdentifies the HorizontalImageAlignment dependency property.
ImageHeightPropertyIdentifies the ImageHeight dependency property.
ImageMarginPropertyIdentifies the ImageMargin dependency property.
ImageSourcePropertyIdentifies the ImageSource dependency property.
ImageStretchPropertyIdentifies the ImageStretch dependency property.
ImageWidthPropertyIdentifies the ImageWidth dependency property.
TextImageRelationPropertyIdentifies the TextImageRelation dependency property.
VerticalImageAlignmentPropertyIdentifies the VerticalImageAlignment dependency property.

Public Methods

InitializeTemplates()Initializes control templates.
OnApplyTemplate()Builds the visual tree for the StylishLabel when a new template is applied.
RefreshContentLayout()Refresh the content display.

Protected Methods

OnContentChanged(object, object)Called when the value of the Content property changes.

Public Constructors

public StylishLabel()

Initializes a new instance of the StylishLabel class.

Public Properties

public Thickness ComputedImageMargin { get; set; }

Internal use.

public Effect ContentEffect { get; set; }

Gets or sets the pixel shader effect to use for rendering the text element.

public ContentType ContentType { get; set; }

Gets or sets the content type of Stylish Label.

public string DisplayText { get; set; }

Gets or sets the display text.

public string DisplayTextPath { get; set; }

Gets or sets the display text path.

public HorizontalAlignment HorizontalImageAlignment { get; set; }

Gets or sets the horizontal alignment of the image element.

public double ImageHeight { get; set; }

Gets or sets the height of the image.

public Thickness ImageMargin { get; set; }

Gets or sets the margin of the image.

public ImageSource ImageSource { get; set; }

Gets or sets the source for the image.

public Stretch ImageStretch { get; set; }

Gets or sets a value that describes how an Image should be stretched to fill the destination rectangle.

public double ImageWidth { get; set; }

Gets or sets the width of the image.

public Grid RootElement { get; }

Gets the root element.

public TextImageRelation TextImageRelation { get; set; }

Gets or sets the position of the text and image relative to each other on a control.

public VerticalAlignment VerticalImageAlignment { get; set; }

Gets or sets the vertical alignment of the image element.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty ComputedImageMarginProperty

Identifies the ComputedImageMargin dependency property.

public static readonly DependencyProperty ContentEffectProperty

Identifies the ContentEffect dependency property.

public static readonly DependencyProperty ContentTypeProperty

Identifies the ContentType dependency property.

public static readonly DependencyProperty DisplayTextPathProperty

Identifies the DisplayText dependency property.

public static readonly DependencyProperty DisplayTextProperty

Identifies the DisplayText dependency property.

public static readonly DependencyProperty HorizontalImageAlignmentProperty

Identifies the HorizontalImageAlignment dependency property.

public static readonly DependencyProperty ImageHeightProperty

Identifies the ImageHeight dependency property.

public static readonly DependencyProperty ImageMarginProperty

Identifies the ImageMargin dependency property.

public static readonly DependencyProperty ImageSourceProperty

Identifies the ImageSource dependency property.

public static readonly DependencyProperty ImageStretchProperty

Identifies the ImageStretch dependency property.

public static readonly DependencyProperty ImageWidthProperty

Identifies the ImageWidth dependency property.

public static readonly DependencyProperty TextImageRelationProperty

Identifies the TextImageRelation dependency property.

public static readonly DependencyProperty VerticalImageAlignmentProperty

Identifies the VerticalImageAlignment dependency property.

Public Methods

public void InitializeTemplates()

Initializes control templates.

public void OnApplyTemplate()

Builds the visual tree for the StylishLabel when a new template is applied.

public void RefreshContentLayout()

Refresh the content display.

Protected Methods

protected void OnContentChanged(object oldContent, object newContent)

Called when the value of the Content property changes.

Parameters

oldContentThe old value of the Content property.
newContentThe new value of the Content property.
  • No labels