Class TripousAvalonExtensions
Provides extension methods for Avalonia controls.
public static class TripousAvalonExtensions
- Inheritance
-
TripousAvalonExtensions
- Inherited Members
Methods
AsInt(TextBox, int?)
Returns the text box value as an integer.
public static int AsInt(this TextBox Box, int? Default = null)
Parameters
BoxTextBoxThe text box.
Defaultint?The default value.
Returns
- int
The integer value.
Close(TabItem)
Closes a tab item by removing it from its parent tab control.
public static void Close(this TabItem Page)
Parameters
PageTabItemThe tab item.
GetText(AutoCompleteBox)
Returns trimmed text from an auto-complete box.
public static string GetText(this AutoCompleteBox Box)
Parameters
BoxAutoCompleteBoxThe auto-complete box.
Returns
- string
The trimmed text.
GetText(ComboBox)
Returns trimmed text from a combo box.
public static string GetText(this ComboBox Box)
Parameters
BoxComboBoxThe combo box.
Returns
- string
The trimmed text.
GetText(TextBox)
Returns trimmed text from a text box.
public static string GetText(this TextBox Box)
Parameters
BoxTextBoxThe text box.
Returns
- string
The trimmed text.
GetText(TextEditor)
Returns trimmed text from a text editor.
public static string GetText(this TextEditor Box)
Parameters
BoxTextEditorThe text editor.
Returns
- string
The trimmed text.
GetTextAlignment(Type)
Returns the text alignment for a type.
public static TextAlignment GetTextAlignment(this Type T)
Parameters
TTypeThe type.
Returns
- TextAlignment
The text alignment.
GetTextAlignment(DataFieldType)
Returns the text alignment for a data field type.
public static TextAlignment GetTextAlignment(this DataFieldType DataType)
Parameters
DataTypeDataFieldTypeThe data field type.
Returns
- TextAlignment
The text alignment.
GetTextAsLines(TextBox)
Returns the text box text as trimmed non-empty lines.
public static string[] GetTextAsLines(this TextBox Box)
Parameters
BoxTextBoxThe text box.
Returns
- string[]
The text lines.
GetValue(CheckBox)
Returns the checked value of a check box.
public static bool GetValue(this CheckBox Box)
Parameters
BoxCheckBoxThe check box.
Returns
- bool
True if the check box is checked; otherwise, false.
PerformClick(Button)
Raises the click event of a button.
public static void PerformClick(this Button Button)
Parameters
ButtonButtonThe button.
TabItem_MiddleClick(object, PointerPressedEventArgs)
Handles middle-click closing for a tab item.
public static void TabItem_MiddleClick(object sender, PointerPressedEventArgs e)
Parameters
senderobjectThe event sender.
ePointerPressedEventArgsThe pointer event arguments.