C# Class Solutionizer.Controls.EllipsisTextBox

This is a subclass of TextBox with the ability to show an ellipsis when the Text doesn't fit in the visible area.
Inheritance: System.Windows.Controls.TextBox
Show file Open project: thoemmi/Solutionizer

Public Properties

Property Type Description
EllipsisPlacementProperty System.Windows.DependencyProperty
IsEllipsisEnabledProperty System.Windows.DependencyProperty
LongTextProperty System.Windows.DependencyProperty
UseLongTextForToolTipProperty System.Windows.DependencyProperty

Public Methods

Method Description
EllipsisTextBox ( ) : System

Protected Methods

Method Description
OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
OnLostKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
OnTextChanged ( System.Windows.Controls.TextChangedEventArgs e ) : void

Private Methods

Method Description
CalcText ( ) : void
EllispsisPlacementChanged ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs ) : void
IsEllipsisEnabledChanged ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs ) : void
LongTextChanged ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs ) : void
PathCompactPathEx ( [ pszOut, string szPath, int cchMax, int dwFlags ) : bool
PrepareForLayout ( ) : void
SetText ( string text ) : void
TextBoxWithEllipsis_LayoutUpdated ( object sender, EventArgs e ) : void
TextBoxWithEllipsis_SizeChanged ( object sender, System.Windows.SizeChangedEventArgs e ) : void
UseLongTextForToolTipChanged ( DependencyObject dependencyObject, System.Windows.DependencyPropertyChangedEventArgs dependencyPropertyChangedEventArgs ) : void

Method Details

EllipsisTextBox() public method

public EllipsisTextBox ( ) : System
return System

OnGotKeyboardFocus() protected method

protected OnGotKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
e System.Windows.Input.KeyboardFocusChangedEventArgs
return void

OnLostKeyboardFocus() protected method

protected OnLostKeyboardFocus ( System.Windows.Input.KeyboardFocusChangedEventArgs e ) : void
e System.Windows.Input.KeyboardFocusChangedEventArgs
return void

OnTextChanged() protected method

protected OnTextChanged ( System.Windows.Controls.TextChangedEventArgs e ) : void
e System.Windows.Controls.TextChangedEventArgs
return void

Property Details

EllipsisPlacementProperty public static property

public static DependencyProperty,System.Windows EllipsisPlacementProperty
return System.Windows.DependencyProperty

IsEllipsisEnabledProperty public static property

If true, Text/LongText will be truncated with ellipsis to fit in the visible area of the TextBox (except when it has the focus).
public static DependencyProperty,System.Windows IsEllipsisEnabledProperty
return System.Windows.DependencyProperty

LongTextProperty public static property

public static DependencyProperty,System.Windows LongTextProperty
return System.Windows.DependencyProperty

UseLongTextForToolTipProperty public static property

If true, ToolTip will be set to LongText whenever LongText doesn't fit in the visible area. If false, ToolTip will be set to null unless the user sets it to something other than LongText.
public static DependencyProperty,System.Windows UseLongTextForToolTipProperty
return System.Windows.DependencyProperty