-
Notifications
You must be signed in to change notification settings - Fork 3
PropertyList.Dialogs.CharInputDialog
Back to home | Back to Reference | View raw text
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi.PropertyList.Dialogs
SolidShineUi.PropertyList.Dialogs.CharInputDialog[[CharInputDialog]]
end
subgraph System.Windows.Markup
System.Windows.Markup.IComponentConnector[[IComponentConnector]]
end
subgraph SolidShineUi
SolidShineUi.FlatWindow[[FlatWindow]]
end
System.Windows.Markup.IComponentConnector --> SolidShineUi.PropertyList.Dialogs.CharInputDialog
SolidShineUi.FlatWindow --> SolidShineUi.PropertyList.Dialogs.CharInputDialog
Type | Name | Methods |
---|---|---|
string |
Description Get or set the description text to display above the text box. This text should describe what the user should enter into the text box. |
get, set |
bool |
DialogResult Get the result of the dialog when it is closed. "False" refers to the user cancelling the operation, while "True" refers to the user confirming, by clicking "OK" or pressing the Enter key. |
get |
bool |
EnterKeyConfirms Get or set whether the Enter key can be used to confirm the dialog. If enabled, pressing down the Enter key will be treated as if the user pressed "OK". |
get, set |
bool |
EscapeKeyCancels Get or set whether the Escape key can be used to cancel the dialog. If enabled, pressing down the Escape key will be treated as if the user pressed "Cancel". |
get, set |
char |
ValueAsChar Get the Unicode character selected in this dialog, as a char. |
get, set |
Rune |
ValueAsRune Get the Unicode character selected in this dialog, as a Rune. |
get |
Returns | Name |
---|---|
void |
EnterIntoRuneMode ()Enable rune mode for this dialog, which will allow the display of characters beyond what a single char can support. This is meant to be used in situations where a Rune, not a char, is needed. |
void |
InitializeComponent ()InitializeComponent |
Returns | Name |
---|---|
Delegate |
_CreateDelegate (Type delegateType, string handler) |
IComponentConnector
-
FlatWindow
public CharInputDialog()
Create a CharInputDialog.
public CharInputDialog(ColorScheme cs)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to use for the window. |
Create a CharInputDialog with a color scheme.
public CharInputDialog(ColorScheme cs, char value)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to use for the window. |
char |
value | The value to preload into this dialog. The user is able to change the value though. |
Create a CharInputDialog with prefilled values, with a char being entered in.
public CharInputDialog(ColorScheme cs, Rune value)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to use for the window. |
Rune |
value | The value to preload into this dialog. The user is able to change the value though. |
Create a StringInputBox with prefilled values, with a Rune being entered in.
Entering in a Rune value will put the dialog into "Rune mode", which can be used to enter in and display characters beyond what a single char can support.
public void EnterIntoRuneMode()
Enable rune mode for this dialog, which will allow the display of characters beyond what a single char can support. This is meant to be used in situations where a Rune, not a char, is needed.
If you suppled a Rune in the constructor for this dialog, then the dialog is already in Rune mode. When using Rune mode, you should get the value entered in via using CharInputDialog.ValueAsRune .
public virtual void InitializeComponent()
InitializeComponent
internal Delegate _CreateDelegate(Type delegateType, string handler)
Type | Name | Description |
---|---|---|
Type |
delegateType | |
string |
handler |
public char ValueAsChar { get; set; }
Get the Unicode character selected in this dialog, as a char.
Note that chars are explicitly UTF-16. Many code points (especially multilingual, extended, or symbol/emoji characters) cannot be represented as a single UTF-16 char, and instead will require two. This dialog only returns one char, but you can check if it is such a char by using Char.IsSurrogate(System.Char) .
If using .NET Core or .NET 5 or higher, you can use Runes instead.
public Rune ValueAsRune { get; }
Get the Unicode character selected in this dialog, as a Rune.
public bool DialogResult { get; }
Get the result of the dialog when it is closed. "False" refers to the user cancelling the operation, while "True" refers to the user confirming, by clicking "OK" or pressing the Enter key.
public bool EnterKeyConfirms { get; set; }
Get or set whether the Enter key can be used to confirm the dialog. If enabled, pressing down the Enter key will be treated as if the user pressed "OK".
public bool EscapeKeyCancels { get; set; }
Get or set whether the Escape key can be used to cancel the dialog. If enabled, pressing down the Escape key will be treated as if the user pressed "Cancel".
public string Description { get; set; }
Get or set the description text to display above the text box. This text should describe what the user should enter into the text box.
Try to keep the description to about a sentence long. Ideally, the overall design of the program should make it apparent what the user should enter into the text box without reading the description.
Generated with ModularDoc