Skip to content

SelectionButton Class

Provides a button-like control that changes focus to a designated previous or next selection button when the arrow keys are pushed.

C#
[DataContract]
public class SelectionButton : Button

Inheritance objectControlBaseButtonBaseButton

Creates a new Selection Button with a specific width and height.

C#
public SelectionButton(int width, int height)

width int
The width of the selection button.

height int
The height of the selection button.

The selection button to focus when the UP key is pressed or the SelectPrevious() method is called.

C#
public SelectionButton? PreviousSelection { get; set; }

The selection button to focus when the DOWN key is pressed or the SelectNext() method is called.

C#
public SelectionButton? NextSelection { get; set; }

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.

C#
public SelectionButton SetNextSelection(ref SelectionButton nextSelection, bool setPreviousOnNext = true)

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.

SelectionButton
The button that was passed to the nextSelection parameter.

Focuses the previous or next selection button depending on if the UP or DOWN arrow keys were pressed.

C#
public override bool ProcessKeyboard(Keyboard info)

info Keyboard
The keyboard state.

bool

Selects the previous selection button.

C#
public SelectionButton? SelectPrevious()

SelectionButton
Returns the previous selection button.

Selects the next selection button.

C#
public SelectionButton? SelectNext()

SelectionButton
Returns the next selection button.