-
Notifications
You must be signed in to change notification settings - Fork 3
Utils.TwoPositionsSelect
Back to home | Back to Reference | View raw text
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi.Utils
SolidShineUi.Utils.TwoPositionsSelect[[TwoPositionsSelect]]
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.Utils.TwoPositionsSelect
System.Windows.Controls.UserControl --> SolidShineUi.Utils.TwoPositionsSelect
Type | Name | Methods |
---|---|---|
Brush |
BackgroundDisabledBrush Get or set the brush to use for the background of the TwoPositionsSelect's box when it is disabled. |
get, set |
Brush |
BorderBrush Get or set the brush used for the border of the TwoPositionsSelect's box. |
get, set |
Brush |
BorderDisabledBrush Get or set the brush to use for the border of the cotnrol, while the control is disabled. |
get, set |
ColorScheme |
ColorScheme Get or set the color scheme used for this TwoPositionsSelect. For easier color scheme management, bind this to the window or larger control you're using. |
get, set |
Brush |
ControlBackground Get or set the brush used for the background of the TwoPositionsSelect's box. |
get, set |
ObservableCollection <double > |
HorizontalSnapPoints Get or set the list of snap points that are displayed along the horizontal (X) axis of the control. 0.0 represents the far left of the control, and 1.0 represents the far right of the control. |
get, set |
double |
KeyMoveStep Get or set the amount the selector is moved each time an arrow key is pressed (while the control is focused). |
get, set |
Brush |
KeyboardFocusHighlight Get or set the brush used for the outline when the control is keyboard focused. |
get, set |
double |
SelectedHeight1 Get or set the first selected value on the vertical (Y) axis. This is how far from the top of the control that the selector is, on a relative scale from 0.0 to 1.0 . |
get, set |
double |
SelectedHeight2 Get or set the second selected value on the vertical (Y) axis. This is how far from the top of the control that the selector is, on a relative scale from 0.0 to 1.0 . |
get, set |
double |
SelectedWidth1 Get or set the first selected value on the horizontal (X) axis. This is how far from the left edge of the control that the selector is, on a relative scale from 0.0 to 1.0 . |
get, set |
double |
SelectedWidth2 Get or set the second selected value on the horizontal (X) axis. This is how far from the left edge of the control that the selector is, on a relative scale from 0.0 to 1.0 . |
get, set |
Brush |
SelectorBrush Get or set the brush used for the selector ellipses in the TwoPositionsSelect. |
get, set |
Brush |
SelectorDisabledBrush Get or set the brush used for the check mark when the control is disabled. |
get, set |
double |
SelectorSize Get or set the size of the selector. The larger the selector, the easier it will be to see and also to click and drag, but also harder to visualize a particular value. |
get, set |
double |
SnapDistance The distance, in pixels, within which the selector should snap to the nearest snap line. The larger the distance, the further the selector can be away from a snap line before it snaps to the line. |
get, set |
Brush |
SnapLineBrush Get or set the brush used for the snap point lines. |
get, set |
bool |
SnapToSnapLines Get or set if the selector should snap to the snap lines within the control. |
get, set |
ObservableCollection <double > |
VerticalSnapPoints Get or set the list of snap points that are displayed along the vertical (Y) axis of the control. 0.0 represents the far top of the control, and 1.0 represents the far bottom of the control. |
get, set |
Returns | Name |
---|---|
void |
OnColorSchemeChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)Perform an action when the ColorScheme property has changed. Primarily used internally. |
void |
OnKeyboardFocusHighlightBrushChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)Perform an action when a property of an object has changed. Primarily used internally. |
void |
OnSnapLineBrushChanged (DependencyObject d, DependencyPropertyChangedEventArgs e)Perform an action when a property of an object 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 |
Returns | Name |
---|---|
void |
UpdateKeyboardFocusHighlightBrush ()An internal method to use for updating the brush when this control has keyboard focus. |
void |
UpdateSnapLineBrush ()Updates the visuals of the snap lines in the control to match the SnapLineBrush property. |
IComponentConnector
UserControl
public TwoPositionsSelect()
Create a TwoPositionsSelect.
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 static void OnSnapLineBrushChanged(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 a property of an object has changed. Primarily used internally.
protected internal void UpdateSnapLineBrush()
Updates the visuals of the snap lines in the control to match the SnapLineBrush property.
public static void OnKeyboardFocusHighlightBrushChanged(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 a property of an object has changed. Primarily used internally.
protected internal void UpdateKeyboardFocusHighlightBrush()
An internal method to use for updating the brush when this control has keyboard focus.
public virtual void InitializeComponent()
InitializeComponent
public ColorScheme ColorScheme { get; set; }
Get or set the color scheme used for this TwoPositionsSelect. For easier color scheme management, bind this to the window or larger control you're using.
public Brush ControlBackground { get; set; }
Get or set the brush used for the background of the TwoPositionsSelect's box.
public Brush SelectorBrush { get; set; }
Get or set the brush used for the selector ellipses in the TwoPositionsSelect.
public Brush BackgroundDisabledBrush { get; set; }
Get or set the brush to use for the background of the TwoPositionsSelect's box when it is disabled.
public Brush BorderDisabledBrush { get; set; }
Get or set the brush to use for the border of the cotnrol, while the control is disabled.
public Brush SelectorDisabledBrush { get; set; }
Get or set the brush used for the check mark when the control is disabled.
public Brush BorderBrush { get; set; }
Get or set the brush used for the border of the TwoPositionsSelect's box.
public Brush SnapLineBrush { get; set; }
Get or set the brush used for the snap point lines.
public Brush KeyboardFocusHighlight { get; set; }
Get or set the brush used for the outline when the control is keyboard focused.
public bool SnapToSnapLines { get; set; }
Get or set if the selector should snap to the snap lines within the control.
public double SnapDistance { get; set; }
The distance, in pixels, within which the selector should snap to the nearest snap line. The larger the distance, the further the selector can be away from a snap line before it snaps to the line.
public ObservableCollection<double> HorizontalSnapPoints { get; set; }
Get or set the list of snap points that are displayed along the horizontal (X) axis of the control. 0.0
represents the far left of the control, and 1.0
represents the far right of the control.
public ObservableCollection<double> VerticalSnapPoints { get; set; }
Get or set the list of snap points that are displayed along the vertical (Y) axis of the control. 0.0
represents the far top of the control, and 1.0
represents the far bottom of the control.
public double SelectorSize { get; set; }
Get or set the size of the selector. The larger the selector, the easier it will be to see and also to click and drag, but also harder to visualize a particular value.
public double KeyMoveStep { get; set; }
Get or set the amount the selector is moved each time an arrow key is pressed (while the control is focused).
public double SelectedWidth1 { get; set; }
Get or set the first selected value on the horizontal (X) axis.
This is how far from the left edge of the control that the selector is, on a relative scale from 0.0
to 1.0
.
public double SelectedHeight1 { get; set; }
Get or set the first selected value on the vertical (Y) axis.
This is how far from the top of the control that the selector is, on a relative scale from 0.0
to 1.0
.
public double SelectedWidth2 { get; set; }
Get or set the second selected value on the horizontal (X) axis.
This is how far from the left edge of the control that the selector is, on a relative scale from 0.0
to 1.0
.
public double SelectedHeight2 { get; set; }
Get or set the second selected value on the vertical (Y) axis.
This is how far from the top of the control that the selector is, on a relative scale from 0.0
to 1.0
.
public event DependencyPropertyChangedEventHandler ColorSchemeChanged
Raised when the ColorScheme property is changed.
public event EventHandler SelectedPositionChanged
Raised when any of the SelectedHeight or SelectedWidth properties change (i.e., when the selector was moved).
Generated with ModularDoc