-
Notifications
You must be signed in to change notification settings - Fork 3
SelectableUserControl
Back to home | Back to Reference | View raw text
The basic control that can be added into a SelectPanel. Extend this class to create your own UI elements to use with the SelectPanel.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi
SolidShineUi.SelectableUserControl[[SelectableUserControl]]
end
subgraph System.Windows.Controls
System.Windows.Controls.UserControl[[UserControl]]
end
System.Windows.Controls.UserControl --> SolidShineUi.SelectableUserControl
Type | Name | Methods |
---|---|---|
Brush |
Background Get or set the brush to use for the background of this control. |
get, set |
bool |
CanSelect Get or set if this control can be selected. |
get, set |
Brush |
ClickBrush Get or set the brush to use for the background of this control while it is being clicked. |
get, set |
Brush |
HighlightBrush Get or set the brush to use for the background of this contol while it is highlighted (i.e. has a mouse over it, or has keyboard focus). |
get, set |
bool |
IsSelected Get or set if this control is currently selected. |
get, set |
Brush |
SelectedBrush Get or set the brush to use for the background of this control while it is selected. |
get, set |
Returns | Name |
---|---|
void |
ApplyColorScheme (ColorScheme cs)When overridden by a derived class, this method is automatically called each time the color scheme is updated by the parent SelectPanel. Use this to update child controls. |
void |
SetIsSelectedWithSource (bool value, SelectionChangeTrigger triggerMethod, object triggerSource)Set the SelectableUserControl.IsSelected value of this control, while also defining how the selection was changed. |
The basic control that can be added into a SelectPanel. Extend this class to create your own UI elements to use with the SelectPanel.
UserControl
public SelectableUserControl()
Create a SelectableUserControl.
public virtual void ApplyColorScheme(ColorScheme cs)
Type | Name | Description |
---|---|---|
ColorScheme |
cs | The new color scheme. |
When overridden by a derived class, this method is automatically called each time the color scheme is updated by the parent SelectPanel. Use this to update child controls.
public void SetIsSelectedWithSource(bool value, SelectionChangeTrigger triggerMethod, object triggerSource)
Type | Name | Description |
---|---|---|
bool |
value | The value to set SelectableUserControl.IsSelected to. |
SelectionChangeTrigger |
triggerMethod | The source or method used to trigger the change in selection. |
object |
triggerSource | The object that triggered the change. |
Set the SelectableUserControl.IsSelected value of this control, while also defining how the selection was changed.
public Brush ClickBrush { get; set; }
Get or set the brush to use for the background of this control while it is being clicked.
public Brush Background { get; set; }
Get or set the brush to use for the background of this control.
public Brush SelectedBrush { get; set; }
Get or set the brush to use for the background of this control while it is selected.
public Brush HighlightBrush { get; set; }
Get or set the brush to use for the background of this contol while it is highlighted (i.e. has a mouse over it, or has keyboard focus).
public bool CanSelect { get; set; }
Get or set if this control can be selected.
public bool IsSelected { get; set; }
Get or set if this control is currently selected.
public event ItemSelectionChangedEventHandler SelectionChanged
Raised if the IsSelected property is changed.
public event EventHandler CanSelectChanged
Raised if the CanSelect property is changed.
public event EventHandler Click
Raised when the control is clicked.
public event EventHandler RightClick
Raised when the control is right-clicked.
public delegate void ItemSelectionChangedEventHandler(object sender, ItemSelectionChangedEventArgs e)
Type | Name | Description |
---|---|---|
object |
sender | |
ItemSelectionChangedEventArgs |
e |
Generated with ModularDoc