C# Класс eCollegeWP7.Views.Controls.DynamicTextBlock

A simple text control that truncates the text to ellipses when there is insufficient room to display all of the text.
Наследование: System.Windows.Controls.ContentControl
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
LineHeightProperty System.Windows.DependencyProperty
LineStackingStrategyProperty System.Windows.DependencyProperty
TextProperty System.Windows.DependencyProperty
TextStyleProperty System.Windows.DependencyProperty
TextWrappingProperty System.Windows.DependencyProperty

Открытые методы

Метод Описание
DynamicTextBlock ( ) : System

Initializes a new instance of the DynamicTextBlock class

Защищенные методы

Метод Описание
GetDesiredText ( string sourceText, int min, int max, Size availableSize, Size unboundSize, bool wrapping ) : string
MeasureOverride ( Size availableSize ) : Size

Handles the measure part of the measure and arrange layout process. During this process we measure the textBlock that we've created as content with increasingly smaller amounts of text until we find text that fits.

OnLineHeightChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLineStackingStrategyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextWrappingChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
ReduceText ( string text ) : string

Reduces the length of the text. Derived classes can override this to use different techniques for reducing the text length.

Приватные методы

Метод Описание
OnLineHeightChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnLineStackingStrategyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextStyleChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnTextWrappingChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

Описание методов

DynamicTextBlock() публичный Метод

Initializes a new instance of the DynamicTextBlock class
public DynamicTextBlock ( ) : System
Результат System

GetDesiredText() защищенный Метод

protected GetDesiredText ( string sourceText, int min, int max, Size availableSize, Size unboundSize, bool wrapping ) : string
sourceText string
min int
max int
availableSize System.Windows.Size
unboundSize System.Windows.Size
wrapping bool
Результат string

MeasureOverride() защищенный Метод

Handles the measure part of the measure and arrange layout process. During this process we measure the textBlock that we've created as content with increasingly smaller amounts of text until we find text that fits.
protected MeasureOverride ( Size availableSize ) : Size
availableSize System.Windows.Size the available size
Результат System.Windows.Size

OnLineHeightChanged() защищенный Метод

protected OnLineHeightChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
Результат void

OnLineStackingStrategyChanged() защищенный Метод

protected OnLineStackingStrategyChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
Результат void

OnTextChanged() защищенный Метод

protected OnTextChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
Результат void

OnTextWrappingChanged() защищенный Метод

protected OnTextWrappingChanged ( System.Windows.DependencyPropertyChangedEventArgs e ) : void
e System.Windows.DependencyPropertyChangedEventArgs
Результат void

ReduceText() защищенный Метод

Reduces the length of the text. Derived classes can override this to use different techniques for reducing the text length.
protected ReduceText ( string text ) : string
text string the original text
Результат string

Описание свойств

LineHeightProperty публичное статическое свойство

public static DependencyProperty,System.Windows LineHeightProperty
Результат System.Windows.DependencyProperty

LineStackingStrategyProperty публичное статическое свойство

public static DependencyProperty,System.Windows LineStackingStrategyProperty
Результат System.Windows.DependencyProperty

TextProperty публичное статическое свойство

public static DependencyProperty,System.Windows TextProperty
Результат System.Windows.DependencyProperty

TextStyleProperty публичное статическое свойство

public static DependencyProperty,System.Windows TextStyleProperty
Результат System.Windows.DependencyProperty

TextWrappingProperty публичное статическое свойство

public static DependencyProperty,System.Windows TextWrappingProperty
Результат System.Windows.DependencyProperty