ClassToggleKey
Definition
Namespace:Telerik.WinControls.VirtualKeyboard
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class ToggleKey : LightVisualToggleButtonElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IDrawFillElement, IImageElement, ITextPrimitive, ITextProvider, IKey
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemUIItemBaseLightVisualElementLightVisualButtonElementLightVisualToggleButtonElementToggleKey
Implements:
Inherited Members
Constructors
ToggleKey(int, KeyType, double, double, bool)
Initializes a new instance of the ToggleKey class.
Declaration
public ToggleKey(int keyCode, KeyType keyType, double width, double height, bool sharpStyle = false)
Parameters
keyCode
The virtual key code.
keyType
The type of the key.
width
The logical width of key.
height
The logical height of key.
sharpStyle
Indicates whether the key has more noticeable(sharp) style.
ToggleKey(int, string, KeyType, double, double, bool, Font)
Initializes a new instance of the ToggleKey class.
Declaration
public ToggleKey(int keyCode, string displayText, KeyType keyType, double width, double height, bool sharpStyle = false, Font font = null)
Parameters
keyCode
The virtual key code.
displayText
The display text.
keyType
The type of the key.
width
The logical width of key.
height
The logical height of key.
sharpStyle
Indicates whether the key has more noticeable(sharp) style.
font
The font specified to the key element.
Fields
IsSharpStyleProperty
Dependency property that indicates whether the key should have more noticeable/sharp style.
Declaration
public static RadProperty IsSharpStyleProperty
Field Value
Properties
AccessibleName
Gets or sets the name of the control for use by accessibility client applications.
Declaration
public override string AccessibleName { get; set; }
Property Value
Overrides
DisplayText
Gets or sets the display text.
FontScale
Gets or sets the font scale coefficient, used when key is larger or smaller than the KeyDefaultSize.
IsSharpStyle
Gets or sets a value indicating whether the key will have more noticeable/sharp style.
KeyHeight
Gets or sets the logical key height.
KeyInfo
Gets or sets the associated key info object.
Declaration
public KeyInfo KeyInfo { get; set; }
Property Value
Implements
KeyRectangle
Gets or sets the logical key bounds.
Declaration
public RectangleF KeyRectangle { get; set; }
Property Value
Implements
KeyType
Gets the type of the key.
Declaration
public KeyType KeyType { get; set; }
Property Value
Implements
KeyWidth
Gets or sets the logical key width.
Owner
Gets the owner element used to send the keys.
Declaration
public IVirtualKeyboardKeyInputSender Owner { get; }
Property Value
Implements
ThemeEffectiveType
Gets the type by which this instance is being themed.
Declaration
protected override Type ThemeEffectiveType { get; }
Property Value
Overrides
VirtualKey
Gets the virtual key code.
Methods
ArrangeKey(RectangleF)
Arranges the key in the specified rectangle.
Declaration
public void ArrangeKey(RectangleF rectangle)
Parameters
rectangle
The layout rectangle.
Implements
GetKeyScaleCoefficient(float, bool)
Gets the font scale coefficient
GetScaledFont(float)
Scales the Font used by the Paint process. The Font property is not changed.
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
OnLoaded()
Called when the element has been successfully loaded. That includes loading of all its children as well.
Declaration
protected override void OnLoaded()
Overrides
OnToggleStateChanged(StateChangedEventArgs)
Raises the StateChanged event.
Declaration
protected override void OnToggleStateChanged(StateChangedEventArgs e)
Parameters
e
Overrides
SendKey()
Sends a virtual key code or string.
Declaration
public void SendKey()
Implements
UpdateKey()
Updates key text and other necessary styles.
Declaration
public void UpdateKey()
Implements