C# Class withSIX.Core.Presentation.Wpf.Extensions.TextBlockTrimmedTooltip

Attached property provider which adds the read-only attached property TextBlockService.IsTextTrimmed to the framework's TextBlock control.
Afficher le fichier Open project: SIXNetworks/withSIX.Desktop

Méthodes publiques

Свойство Type Description
AutomaticToolTipEnabledProperty System.Windows.DependencyProperty
IsTextTrimmedKey System.Windows.DependencyPropertyKey
IsTextTrimmedProperty System.Windows.DependencyProperty

Méthodes publiques

Méthode Description
OnTextBlockSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void

Event handler for TextBlock's SizeChanged routed event. Triggers evaluation of the IsTextTrimmed attached property.

SetAutomaticToolTipEnabled ( DependencyObject element, bool value ) : void

Sets the current effective value of the AutomaticToolTipEnabled attached property.

Private Methods

Méthode Description
CalculateIsTextTrimmed ( System.Windows.Controls.TextBlock textBlock ) : bool

Determines whether or not the text in textBlock is currently being trimmed due to width or height constraints.

Does not work properly when TextWrapping is set to WrapWithOverflow.

GetAutomaticToolTipEnabled ( DependencyObject element ) : bool
GetIsTextTrimmed ( System.Windows.Controls.TextBlock target ) : bool
SetIsTextTrimmed ( System.Windows.Controls.TextBlock target, bool value ) : void

Sets the instance value of read-only dependency property IsTextTrimmed.

TextBlockTrimmedTooltip ( ) : System

Method Details

OnTextBlockSizeChanged() public static méthode

Event handler for TextBlock's SizeChanged routed event. Triggers evaluation of the IsTextTrimmed attached property.
public static OnTextBlockSizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
sender object Object where the event handler is attached
e System.Windows.SizeChangedEventArgs Event data
Résultat void

SetAutomaticToolTipEnabled() public static méthode

Sets the current effective value of the AutomaticToolTipEnabled attached property.
public static SetAutomaticToolTipEnabled ( DependencyObject element, bool value ) : void
element System.Windows.DependencyObject
value bool true to enable the automatic ToolTip; otherwise false
Résultat void

Property Details

AutomaticToolTipEnabledProperty public_oe static_oe property

Identifier associated with the attached property AutomaticToolTipEnabled.
public static DependencyProperty,System.Windows AutomaticToolTipEnabledProperty
Résultat System.Windows.DependencyProperty

IsTextTrimmedKey public_oe static_oe property

Key returned upon registering the read-only attached property IsTextTrimmed.
public static DependencyPropertyKey,System.Windows IsTextTrimmedKey
Résultat System.Windows.DependencyPropertyKey

IsTextTrimmedProperty public_oe static_oe property

Identifier associated with the read-only attached property IsTextTrimmed.
public static DependencyProperty,System.Windows IsTextTrimmedProperty
Résultat System.Windows.DependencyProperty