Class ToggleKey
Inheritance
Inherited Members
Namespace: Telerik.WinControls.VirtualKeyboard
Assembly: Telerik.WinControls.UI.dll
Syntax
public class ToggleKey : LightVisualToggleButtonElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider, IKey
Constructors
ToggleKey()
This method is used internally. To create a new ToggleKey instance use the other constructors instead.
Declaration
public ToggleKey()
ToggleKey(Int32, String, KeyType, Double, Double, Boolean, 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
System.Int32
keyCode
The virtual key code. |
System.String
displayText
The display text. |
KeyType
keyType
The type of the key. |
System.Double
width
The logical width of key. |
System.Double
height
The logical height of key. |
System.Boolean
sharpStyle
Indicates whether the key has more noticeable(sharp) style. |
System.Drawing.Font
font
The font specified to the key element. |
ToggleKey(Int32, KeyType, Double, Double, Boolean)
Initializes a new instance of the ToggleKey class.
Declaration
public ToggleKey(int keyCode, KeyType keyType, double width, double height, bool sharpStyle = false)
Parameters
System.Int32
keyCode
The virtual key code. |
KeyType
keyType
The type of the key. |
System.Double
width
The logical width of key. |
System.Double
height
The logical height of key. |
System.Boolean
sharpStyle
Indicates whether the key has more noticeable(sharp) style. |
Fields
IsSharpStyleProperty
Dependency property that indicates whether the key should have more noticeable/sharp style.
Declaration
public static RadProperty IsSharpStyleProperty
Field Value
RadProperty
|
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
System.String
|
Overrides
DisplayText
Gets or sets the display text.
Declaration
public string DisplayText { get; set; }
Property Value
System.String
|
FontScale
Gets or sets the font scale coefficient, used when key is larger or smaller than the KeyDefaultSize.
Declaration
public float FontScale { get; set; }
Property Value
System.Single
|
Implements
IsSharpStyle
Gets or sets a value indicating whether the key will have more noticeable/sharp style.
Declaration
public bool IsSharpStyle { get; set; }
Property Value
System.Boolean
|
KeyHeight
Gets or sets the logical key height.
Declaration
public float KeyHeight { get; set; }
Property Value
System.Single
|
Implements
KeyInfo
Gets or sets the associated key info object.
Declaration
public KeyInfo KeyInfo { get; set; }
Property Value
KeyInfo
|
Implements
KeyRectangle
Gets or sets the logical key bounds.
Declaration
public RectangleF KeyRectangle { get; set; }
Property Value
System.Drawing.RectangleF
|
Implements
KeyType
Gets the type of the key.
Declaration
public KeyType KeyType { get; set; }
Property Value
KeyType
|
Implements
KeyWidth
Gets or sets the logical key width.
Declaration
public float KeyWidth { get; set; }
Property Value
System.Single
|
Implements
Owner
Gets the owner element used to send the keys.
Declaration
public IVirtualKeyboardKeyInputSender Owner { get; }
Property Value
IVirtualKeyboardKeyInputSender
|
Implements
ThemeEffectiveType
Gets the type by which this instance is being themed.
Declaration
protected override Type ThemeEffectiveType { get; }
Property Value
System.Type
|
Overrides
VirtualKey
Gets the virtual key code.
Declaration
public int VirtualKey { get; set; }
Property Value
System.Int32
|
Implements
Methods
ArrangeKey(RectangleF)
Arranges the key in the specified rectangle.
Declaration
public void ArrangeKey(RectangleF rectangle)
Parameters
System.Drawing.RectangleF
rectangle
The layout rectangle. |
Implements
GetKeyScaleCoefficient(Single, Boolean)
Gets the font scale coefficient
Declaration
protected virtual float GetKeyScaleCoefficient(float scale, bool reduceDownscale = false)
Parameters
System.Single
scale
Base scale factor. |
System.Boolean
reduceDownscale
A boolean property that indicates whether to slow down the down scale process. |
Returns
System.Single
|
GetScaledFont(Single)
Scales the System.Drawing.Font used by the Paint process. The Font property is not changed.
Declaration
public override Font GetScaledFont(float scale)
Parameters
System.Single
scale
Scale factor. |
Returns
System.Drawing.Font
The scaled font. |
Overrides
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
StateChangedEventArgs
e
|
Overrides
SendKey()
UpdateKey()
Updates key text and other necessary styles.
Declaration
public void UpdateKey()