C# Class nature_net.user_controls.WPFExtensions

Mostrar archivo Open project: naturenet/nature-net-ppi

Public Methods

Method Description
InsertText ( this textbox, string sTextToInsert ) : void

Insert the given text into this TextBox at the current CaretIndex, and replacing any already-selected text.

MoveAsAGroup ( this me, double desiredXDisplacement, double desiredYDisplacement, bool &isIgnoringLocationChangedEvent ) : void
TextTrimmed ( this textbox ) : string

This is just a convenience extension-method to simplify the getting of strings from a WPF TextBox. It was a pain in da butt, having to remember to test for nulls, whitespace, etc. Now, all you have to do is check the .Length

Method Details

InsertText() public static method

Insert the given text into this TextBox at the current CaretIndex, and replacing any already-selected text.
public static InsertText ( this textbox, string sTextToInsert ) : void
textbox this The TextBox to insert the new text into
sTextToInsert string The text to insert into this TextBox
return void

MoveAsAGroup() public static method

public static MoveAsAGroup ( this me, double desiredXDisplacement, double desiredYDisplacement, bool &isIgnoringLocationChangedEvent ) : void
me this
desiredXDisplacement double
desiredYDisplacement double
isIgnoringLocationChangedEvent bool
return void

TextTrimmed() public static method

This is just a convenience extension-method to simplify the getting of strings from a WPF TextBox. It was a pain in da butt, having to remember to test for nulls, whitespace, etc. Now, all you have to do is check the .Length
public static TextTrimmed ( this textbox ) : string
textbox this The WPF TextBox to get the Text from
return string