SelectionButton Class
Definition
Section titled “Definition”Provides a button-like control that changes focus to a designated previous or next selection button when the arrow keys are pushed.
[DataContract]public class SelectionButton : ButtonInheritance object → ControlBase → ButtonBase → Button
Constructors
Section titled “Constructors”SelectionButton(int, int)
Section titled “SelectionButton(int, int)”Creates a new Selection Button with a specific width and height.
public SelectionButton(int width, int height)Parameters
Section titled “Parameters”width int
The width of the selection button.
height int
The height of the selection button.
Properties
Section titled “Properties”PreviousSelection
Section titled “PreviousSelection”The selection button to focus when the UP key is pressed or the SelectPrevious() method is called.
public SelectionButton? PreviousSelection { get; set; }NextSelection
Section titled “NextSelection”The selection button to focus when the DOWN key is pressed or the SelectNext() method is called.
public SelectionButton? NextSelection { get; set; }Methods
Section titled “Methods”SetNextSelection(ref SelectionButton, bool)
Section titled “SetNextSelection(ref SelectionButton, bool)”Sets the next selection button and optionally sets the previous of the referenced selection to this button.
public SelectionButton SetNextSelection(ref SelectionButton nextSelection, bool setPreviousOnNext = true)Parameters
Section titled “Parameters”nextSelection SelectionButton
The selection button to be used as next.
setPreviousOnNext bool
Sets the PreviousSelection property on the nextSelection instance to current selection button. Defaults to true.
Returns
Section titled “Returns”SelectionButton
The button that was passed to the nextSelection parameter.
ProcessKeyboard(Keyboard)
Section titled “ProcessKeyboard(Keyboard)”Focuses the previous or next selection button depending on if the UP or DOWN arrow keys were pressed.
public override bool ProcessKeyboard(Keyboard info)Parameters
Section titled “Parameters”info Keyboard
The keyboard state.
Returns
Section titled “Returns”SelectPrevious()
Section titled “SelectPrevious()”Selects the previous selection button.
public SelectionButton? SelectPrevious()Returns
Section titled “Returns”SelectionButton
Returns the previous selection button.
SelectNext()
Section titled “SelectNext()”Selects the next selection button.
public SelectionButton? SelectNext()Returns
Section titled “Returns”SelectionButton
Returns the next selection button.