-
Notifications
You must be signed in to change notification settings - Fork 3
IntegerSpinner
Back to home | Back to Reference | View raw text
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.IntegerSpinner[[IntegerSpinner]]
end
subgraph System.Windows.Markup
System.Windows.Markup.IComponentConnector[[IComponentConnector]]
end
subgraph System.Windows.Controls
System.Windows.Controls.UserControl[[UserControl]]
end
System.Windows.Markup.IComponentConnector --> SolidShineUi.IntegerSpinner
System.Windows.Controls.UserControl --> SolidShineUi.IntegerSpinner
Type | Name | Methods |
---|---|---|
bool |
AcceptExpressions Get or set if the spinner should evaluate arithmetic expressions (such as "2+5") to accept as a value. |
get, set |
Brush |
BorderBrush Get or set the brush of the border around the control. |
get, set |
Brush |
BorderDisabledBrush Get or set the brush used for the border around the control, while the control is disabled. |
get, set |
Brush |
ButtonBackground Get or set the brush used for the background of the buttons of the spinner. |
get, set |
Brush |
ClickBrush Get or set the brush used when a button is being clicked. |
get, set |
ColorScheme |
ColorScheme Get or set the color scheme used for this spinner. For easier color scheme management, bind this to the window or larger control you're using. |
get, set |
CornerRadius |
CornerRadius Get or set the corner radius to use around the corners of this control. Setting the corner radius to a value other than 0 displays rounded corners. |
get, set |
Brush |
DisabledBrush Get or set the brush used for the background of the buttons when the control is disabled. |
get, set |
bool |
DisplayAsHex Get or set whether to show the value as a hexadecimal or decimal value. Note that while DisplayAsHex is set to true, IntegerSpinner.AcceptExpressions is ignored. |
get, set |
Brush |
HighlightBrush Get or set the brush used when a button is highlighted (i.e. has a mouse over it or keyboard focus). |
get, set |
int |
MaxValue Get or set the maximum value allowed for this spinner (inclusive). |
get, set |
int |
MinValue Get or set the minimum value allowed for this spinner (inclusive). |
get, set |
int |
MinimumDigitCount Get or set the minimum number of digits to display in the spinner. A value of 0 or lower will display only the minimum needed for the number being displayed. |
get, set |
double |
RepeatDelay Get or set the delay period before starting the repeatedly stepping up or down while the button is held, in milliseconds. Default is 300 milliseconds. |
get, set |
bool |
ShowArrows Get or set whether the up and down arrow buttons are shown. |
get, set |
int |
Step Get or set how much to change the value by when you press the up or down button. |
get, set |
int |
Value Get or set the value of the spinner. |
get, set |
Returns | Name |
---|---|
void |
OnColorSchemeChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)Perform an action when the ColorScheme property has changed. Primarily used internally. |
Returns | Name |
---|---|
void |
ApplyColorScheme (ColorScheme cs)Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control. |
void |
InitializeComponent ()InitializeComponent |
IComponentConnector
UserControl
public IntegerSpinner()
Create an IntegerSpinner.
public static void OnColorSchemeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Type | Name | Description |
---|---|---|
DependencyObject |
d | The object containing the property that changed. |
DependencyPropertyChangedEventArgs |
e | Event arguments about the property change. |
Perform an action when the ColorScheme property has changed. Primarily used internally.
public void ApplyColorScheme(ColorScheme cs)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The color scheme to apply. |
Apply a color scheme to this control. The color scheme can quickly apply a whole visual style to the control.
public virtual void InitializeComponent()
InitializeComponent
public ColorScheme ColorScheme { get; set; }
Get or set the color scheme used for this spinner. For easier color scheme management, bind this to the window or larger control you're using.
public Brush ButtonBackground { get; set; }
Get or set the brush used for the background of the buttons of the spinner.
public Brush DisabledBrush { get; set; }
Get or set the brush used for the background of the buttons when the control is disabled.
public Brush BorderBrush { get; set; }
Get or set the brush of the border around the control.
public Brush HighlightBrush { get; set; }
Get or set the brush used when a button is highlighted (i.e. has a mouse over it or keyboard focus).
public Brush ClickBrush { get; set; }
Get or set the brush used when a button is being clicked.
public Brush BorderDisabledBrush { get; set; }
Get or set the brush used for the border around the control, while the control is disabled.
public int Value { get; set; }
Get or set the value of the spinner.
public int Step { get; set; }
Get or set how much to change the value by when you press the up or down button.
public int MinValue { get; set; }
Get or set the minimum value allowed for this spinner (inclusive).
public int MaxValue { get; set; }
Get or set the maximum value allowed for this spinner (inclusive).
public double RepeatDelay { get; set; }
Get or set the delay period before starting the repeatedly stepping up or down while the button is held, in milliseconds. Default is 300 milliseconds.
public CornerRadius CornerRadius { get; set; }
Get or set the corner radius to use around the corners of this control. Setting the corner radius to a value other than 0 displays rounded corners.
public bool AcceptExpressions { get; set; }
Get or set if the spinner should evaluate arithmetic expressions (such as "2+5") to accept as a value.
See the ArithmeticParser class for more info about how expressions are parsed. Note that AcceptExpressions is ignored (and expressions not accepted) while IntegerSpinner.DisplayAsHex is set to true.
public bool ShowArrows { get; set; }
Get or set whether the up and down arrow buttons are shown.
public bool DisplayAsHex { get; set; }
Get or set whether to show the value as a hexadecimal or decimal value. Note that while DisplayAsHex is set to true, IntegerSpinner.AcceptExpressions is ignored.
Certain situations, particularly involving computer representations of data or memory, may benefit more with displaying numbers as hexadecimals rather than decimals. With hexadecimals, the letters A-F are allowed along with 0-9, and the number "15" in decimal turns into "F" in hexadecimal. Please view online resources like Wikipedia for more details.
public int MinimumDigitCount { get; set; }
Get or set the minimum number of digits to display in the spinner. A value of 0 or lower will display only the minimum needed for the number being displayed.
This modifies the number of digits being rendered via Int32.ToString(System.String) .
Setting this to 4
and then setting the Value to 16
will render the text 0016
in the display. The stored value isn't affected.
You should generally avoid setting this to numbers larger than 99, as larger numbers are only supported in newer versions of .NET.
public event EventHandler PropertyChanged
Raised when the Value, MinValue, or MaxValue properties are changed. Used internally to trigger revalidating the value.
public event DependencyPropertyChangedEventHandler ValueChanged
Raised when the Value property is changed.
public event EventHandler ValueValidated
Raised when the Value property is validated, and changed to a valid value if needed.
public event DependencyPropertyChangedEventHandler ColorSchemeChanged
Raised when the ColorScheme property is changed.
protected event DependencyPropertyChangedEventHandler InternalValueChanged
Internal event for handling a property changed. Please view the event that is not prefixed as "Internal".
protected event DependencyPropertyChangedEventHandler InternalRepeatDelayChanged
Internal event for handling a property changed. Please view the event that is not prefixed as "Internal".
public event RoutedEventHandler RepeatDelayChanged
Raised when the RepeatDelay property is changed.
protected event DependencyPropertyChangedEventHandler InternalCornerRadiusChanged
Internal event for handling a property changed. Please view the event that is not prefixed as "Internal".
public event RoutedEventHandler CornerRadiusChanged
Raised when the CornerRadius property is changed.
protected event DependencyPropertyChangedEventHandler InternalShowArrowsChanged
Internal event for handling a property changed. Please view the event that is not prefixed as "Internal".
public event RoutedEventHandler ShowArrowsChanged
Raised when the ShowArrows property is changed.
protected event DependencyPropertyChangedEventHandler InternalDisplayAsHexChanged
Internal event for handling a property changed. Please view the event that is not prefixed as "Internal".
public event RoutedEventHandler DisplayAsHexChanged
Raised when the DisplayAsHex property is changed.
Generated with ModularDoc