New to Telerik UI for WinFormsStart a free 30-day trial

Represents the state of the modifier keys (SHIFT, CTRL, and ALT) in a Chord.

Definition

Namespace:Telerik.WinControls.Keyboard

Assembly:Telerik.WinControls.dll

Syntax:

C#
[TypeConverter(typeof(ChordModifierConverter))]
public class ChordModifier : IComparable, INotifyPropertyChanged

Inheritance: objectChordModifier

Implements: IComparableINotifyPropertyChanged

Constructors

Initializes a new instance of the ChordModifier class with default settings.

C#
public ChordModifier()

Initializes a new instance of the ChordModifier using explicit setting for every property.

C#
public ChordModifier(bool altModifier, bool controlModifier, bool shiftModifier)
Parameters:altModifierboolcontrolModifierboolshiftModifierbool

Initializes a new instance of the ChordModifier using data provided by another instance.

C#
public ChordModifier(ChordModifier chordModifier)
Parameters:chordModifierChordModifier

Initializes a new instance of the ChordModifier using data provided by Keys input.

C#
public ChordModifier(Keys pressedKey)
Parameters:pressedKeyKeys

Properties

Gets a value indicating if the ALT modifier key is in a pressed state.

C#
public bool AltModifier { get; set; }

Gets a value indicating if the CTRL modifier key is in a pressed state.

C#
public bool ControlModifier { get; set; }

Gets a value indicating if any of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state.

C#
public bool IsEmpty { get; }

Gets a value indicating if the SHIFT modifier key is in a pressed state.

C#
public bool ShiftModifier { get; set; }

Methods

Removes all data from the ChordModifier.

C#
public void Clear()

Compares this instance to a specified object or ChordModifier and returns an indication of their relative values.

C#
public int CompareTo(object obj)
Parameters:objobject

An object to compare, or a null reference (Nothing in Visual Basic).

Returns:

int

A signed number indicating the relative values of this instance and value.

Return Value

Description

Less than zero

This instance is less than value.

Zero

This instance is equal to value.

Greater than zero

This instance is greater than value.

-or-

value is a null reference (Nothing in Visual Basic).

Collapse imageExceptions

Implements: IComparable.CompareTo(object)

Updates a ChordModifier instance based on a Keys input value

C#
public static ChordModifier GetModifiers(ChordModifier tempModifier, Keys pressedKey)
Parameters:tempModifierChordModifier

ChordModifier instance to update

pressedKeyKeys

Keys input value

Returns:

ChordModifier

ChordModifier instance with updated states

Creates new ChordModifier instance based on a Keys input value

C#
public static ChordModifier GetModifiers(Keys pressedKey)
Parameters:pressedKeyKeys

Keys input value

Returns:

ChordModifier

ChordModifier instance

C#
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs e)
Parameters:ePropertyChangedEventArgs

Raises the PropertyChanged event

C#
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the property

Events

Notifies clients that a property value has changed.

C#
[Browsable(false)]
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged