Click or drag to resize

UtilsToKeyCode Method

Converts a WPF Key value into its equivalent WinForms key code.

Namespace:  Openfin.WPF
Assembly:  Openfin.WPF (in Openfin.WPF.dll) Version: 17.4.0
Syntax
C#
public static Nullable<int> ToKeyCode(
	this Key key
)

Parameters

key
Type: System.Windows.InputKey
The WPF Key value to convert.

Return Value

Type: NullableInt32
The Winforms key code.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Key. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also