Skip to end of metadata
Go to start of metadata

Remarks

EllipsisText is a label control with automatic text trimming mechanism. When the text exceeds the control dimension, it will trim the text and automatically adds an ellipsis indicator to the text.

Example

You can customize the position of the trimmed text by setting EllipsisPosition property. The following example show how to customize the EllipsisPosition.

XAML

Working with TooltipMode Property

Mode == EllipsisText, will only show tooltip for ellipsis text. Mode == All, will show tooltip on all text.

Working with TooltipStyle Property and TooltipUIMode Property

EllipsisText also support interactive tooltip to show the actual text. You can customize the style through the TooltipStyle property, which is shown in the following example.

XAML

Alternatively, you can use the standard tooltip from Silverlight instead of StylishLabel control by changing the TooltipUIMode to Basic.

XAML

Definition

public class EllipsisText : ISControl

Summary

The following table summarizes the members exposed in this class.

Public Constructors

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

Public Properties

CornerRadiusRepresents the radius of a border's corner. The radius can't be negative.
EllipsisPositionGets or sets the ellipsis position.
FadeInStoryboardGets the fade in storyboard.
FadeOutStoryboardGets the fade out storyboard.
IsEllipsisTextGets a value that indicates whether the text is ellipsis text.
PopupElementGets the popup element.
RootElementGets the root element.
TextGets or sets the text.
TooltipElementGets the tooltip element.
TooltipModeGets or sets a value that determines when tooltip should be shown.
TooltipStyleGets or sets the tooltip style.
TooltipUIModeGets or sets a value that determines the tooltip appaerance.

Protected Properties

ProductProduct Info.

Fields

CornerRadiusPropertyIdentifies the CornerRadius dependency property.
EllipsisPositionPropertyIdentifies the EllipsisPosition dependency property.
TextPropertyIdentifies the Text dependency property.
TooltipModePropertyIdentifies the TooltipMode dependency property.
TooltipStylePropertyIdentifies the TooltipStyle dependency property.
TooltipUIModePropertyIdentifies the TooltipUIMode dependency property.

Public Methods

AttachEventHandlers()Attach built-in event handlers to control templates. Call this method if necessary.
DetachedEventHandlers()Detach built-in event handlers from control templates. Call this method if necessary.
GoToFadeOutState()Go to fade out state.
InitializeStoryboards()Initializes storyboards.
InitializeTemplates()Initializes control templates.
OnApplyTemplate()Builds the visual tree for the EllipsisText when a new template is applied.
RefreshUIElement()Refresh the entire ui element using the latest configuration.

Protected Methods

OnMouseEnter(MouseEventArgs)Called before the System.Windows.UIElement.MouseEnter event occurs.
OnMouseLeave(MouseEventArgs)Called before the MouseLeave event occurs.
OnMouseLeftButtonDown(MouseButtonEventArgs)Called before the System.Windows.UIElement.MouseLeftButtonDown event occurs.
OnMouseMove(MouseEventArgs)Called before the MouseMove event occurs.
OnUnloaded(object, RoutedEventArgs)Called when the element is unloaded.

Public Constructors

public EllipsisText()

Initializes a new instance of the EllipsisText class.

Public Properties

public CornerRadius CornerRadius { get; set; }

Represents the radius of a border's corner. The radius can't be negative.

public EllipsisPosition EllipsisPosition { get; set; }

Gets or sets the ellipsis position.

Remarks

The ellipsis can be positioned at center, left or right.

 

public Storyboard FadeInStoryboard { get; }

Gets the fade in storyboard.

public Storyboard FadeOutStoryboard { get; }

Gets the fade out storyboard.

public bool IsEllipsisText { get; }

Gets a value that indicates whether the text is ellipsis text.

public UXPopup PopupElement { get; }

Gets the popup element.

public Grid RootElement { get; }

Gets the root element.

public string Text { get; set; }

Gets or sets the text.

public StylishLabel TooltipElement { get; }

Gets the tooltip element.

public EllipsisTooltipMode TooltipMode { get; set; }

Gets or sets a value that determines when tooltip should be shown.

Remarks

Mode == EllipsisText, will only show tooltip for ellipsis text. Mode == All, will show tooltip on all text.

 

public Style TooltipStyle { get; set; }

Gets or sets the tooltip style.

public EllipsisTooltipUIMode TooltipUIMode { get; set; }

Gets or sets a value that determines the tooltip appaerance.

Remarks

Mode == Basic will use basic tooltip from silverlight, Mode == StylishLabel will use Intersoft stylish label control.

 

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty CornerRadiusProperty

Identifies the CornerRadius dependency property.

public static readonly DependencyProperty EllipsisPositionProperty

Identifies the EllipsisPosition dependency property.

public static readonly DependencyProperty TextProperty

Identifies the Text dependency property.

public static readonly DependencyProperty TooltipModeProperty

Identifies the TooltipMode dependency property.

public static readonly DependencyProperty TooltipStyleProperty

Identifies the TooltipStyle dependency property.

public static readonly DependencyProperty TooltipUIModeProperty

Identifies the TooltipUIMode dependency property.

Public Methods

public void AttachEventHandlers()

Attach built-in event handlers to control templates. Call this method if necessary.

public void DetachedEventHandlers()

Detach built-in event handlers from control templates. Call this method if necessary.

public void GoToFadeOutState()

Go to fade out state.

public void InitializeStoryboards()

Initializes storyboards.

public void InitializeTemplates()

Initializes control templates.

public void OnApplyTemplate()

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

public void RefreshUIElement()

Refresh the entire ui element using the latest configuration.

Protected Methods

protected void OnMouseEnter(MouseEventArgs e)

Called before the System.Windows.UIElement.MouseEnter event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseLeave(MouseEventArgs e)

Called before the MouseLeave event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Called before the System.Windows.UIElement.MouseLeftButtonDown event occurs.

Parameters

eThe data for the event.

 

protected void OnMouseMove(MouseEventArgs e)

Called before the MouseMove event occurs.

Parameters

eThe data for the event.

 

protected void OnUnloaded(object sender, RoutedEventArgs e)

Called when the element is unloaded.

Parameters

senderThe sender of the event.
eThe event data for the property change.
  • No labels