Class VirtualKeyboardLayoutPanel
Represents a class that hosts all BaseVirtualKeyboardLayout instances and contains the layout implementation. This class also has several predefined layouts panels.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.VirtualKeyboard
Assembly: Telerik.WinControls.UI.dll
Syntax
public class VirtualKeyboardLayoutPanel : BaseVirtualKeyboardLayout, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IVirtualKeyboardLayout
Constructors
VirtualKeyboardLayoutPanel()
Initializes a new instance of the VirtualKeyboardLayoutPanel class.
Declaration
public VirtualKeyboardLayoutPanel()
VirtualKeyboardLayoutPanel(Orientation)
Initializes a new instance of the VirtualKeyboardLayoutPanel class.
Declaration
public VirtualKeyboardLayoutPanel(Orientation orientation)
Parameters
System.Windows.Forms.Orientation
orientation
The orientation of KeyboardLayouts. |
Properties
KeyboardLayouts
Gets a collection of all added BaseVirtualKeyboardLayout instances.
Declaration
public ObservableCollection<BaseVirtualKeyboardLayout> KeyboardLayouts { get; }
Property Value
ObservableCollection<BaseVirtualKeyboardLayout>
|
KeyDefaultSize
Gets or sets the default size in pixels for keys.
Declaration
public static SizeF KeyDefaultSize { get; set; }
Property Value
System.Drawing.SizeF
|
LayoutSpacing
Gets or sets the spacing between each BaseVirtualKeyboardLayout in KeyboardLayouts.
Declaration
public double LayoutSpacing { get; set; }
Property Value
System.Double
|
Orientation
Gets or sets the way how KeyboardLayouts are arranged. Default value is System.Windows.Forms.Orientation.Horizontal.
Declaration
public Orientation Orientation { get; set; }
Property Value
System.Windows.Forms.Orientation
|
TotalColumnsCount
Gets the total number of logical columns.
Declaration
public override double TotalColumnsCount { get; }
Property Value
System.Double
|
Overrides
TotalRowsCount
Gets the total number of logical rows.
Declaration
public override double TotalRowsCount { get; }
Property Value
System.Double
|
Overrides
Methods
ArrangeHorizontally(SizeF)
Arranges the KeyboardLayouts horizontally.
Declaration
protected virtual void ArrangeHorizontally(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final size. |
ArrangeOverride(SizeF)
Arranges the VirtualKeyboardLayoutPanel to its final location. The element must call the Arrange method of each of its children.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The size that is available for element. |
Returns
System.Drawing.SizeF
The rectangle occupied by the element. Usually |
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
ArrangeVertically(SizeF)
Arranges the KeyboardLayouts vertically.
Declaration
protected virtual void ArrangeVertically(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The final size. |
CreateExtendedKeyboardLayout(Boolean)
Creates a new instance of the VirtualKeyboardLayoutPanel class with added panels, layouts and buttons for extended keyboard layout. This includes the functions keys, main keys, home buttons and numpad keyboard groups.
Declaration
public static VirtualKeyboardLayoutPanel CreateExtendedKeyboardLayout(bool addFunctionKeys = true)
Parameters
System.Boolean
addFunctionKeys
A value indicating whether to include the function keys group. |
Returns
VirtualKeyboardLayoutPanel
The created instance. |
CreateKeyboardLayout(Boolean, Boolean, Boolean, Boolean)
Creates a new instance of the VirtualKeyboardLayoutPanel class with added panels, layouts and buttons. This may include the functions keys, main keys, home buttons and/or numpad keyboard groups based on passed parameters.
Declaration
public static VirtualKeyboardLayoutPanel CreateKeyboardLayout(bool addFunctionKeys = true, bool addNumpadGroup = true, bool addHomeGroup = true, bool addArrowsInMainGroup = false)
Parameters
System.Boolean
addFunctionKeys
A value indicating whether to include the function keys group. |
System.Boolean
addNumpadGroup
A value indicating whether to include the numpad keys group. |
System.Boolean
addHomeGroup
A value indicating whether to include the home keyboard buttons group. |
System.Boolean
addArrowsInMainGroup
A value indicating whether to include the arrow keys in the main group. |
Returns
VirtualKeyboardLayoutPanel
The created instance. |
CreateNumpadLayout(Boolean)
Creates a new instance of the VirtualKeyboardLayoutPanel class with added panels, layouts and buttons for numpad keyboard layout. This includes the numpad buttons group.
Declaration
public static VirtualKeyboardLayoutPanel CreateNumpadLayout(bool defaultLayout = true)
Parameters
System.Boolean
defaultLayout
If true loads the default Numpad buttons layout(numlock button is on the bottom), otherwise the traditional(numlock is on top). |
Returns
VirtualKeyboardLayoutPanel
The created instance. |
CreateSimplifiedKeyboardLayout(Boolean)
Creates a new instance of the VirtualKeyboardLayoutPanel class with added panels, layouts and buttons for simplified keyboard layout. This includes the main buttons group.
Declaration
public static VirtualKeyboardLayoutPanel CreateSimplifiedKeyboardLayout(bool addHomeGroup = false)
Parameters
System.Boolean
addHomeGroup
A value indicating whether to include the home keyboard buttons group. |
Returns
VirtualKeyboardLayoutPanel
The created instance. |
GetAllKeys()
Gets a list with all IKey instances in this object and its children.
Declaration
public override IList<IKey> GetAllKeys()
Returns
System.Collections.Generic.IList<IKey>
The IList with all keys. |
Overrides
GetAllRows()
Gets a list with all Row instances in this object and its children.
Declaration
public override IList<Row> GetAllRows()
Returns
System.Collections.Generic.IList<Row>
The IList with all rows. |
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
MeasureOverride(SizeF)
Measures the space required by the VirtualKeyboardLayoutPanel
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The size that is available to the VirtualKeyboardLayoutPanel. The available size can be infinity (to take the full size of the element) |
Returns
System.Drawing.SizeF
The minimum size required by the element to be completely visible. Cannot be infinity. |
Overrides
Remarks
In this method call to the Measure method of each child must be made.
ResetLayout()
Resets the logical layout. When VirtualKeyboardLayoutPanels, VirtualKeyboardLayout and/or IKeys are added, removed or changed, this method needs to be called to refresh and update the logical layout.
Declaration
public override void ResetLayout()
Overrides
ShouldArrangeChild(RadElement)
Gets a value indicating, whether a child will be arranged during the ArrangeOverride.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
RadElement
child
The child. |
Returns
System.Boolean
Whether the child will be arranged in ArrangeOverride. |
Overrides
UpdateKeysFontScale(Double, Double)
Updates the FontScale property for each key in current instance or its children.
Declaration
protected virtual void UpdateKeysFontScale(double singleKeyWidth, double singleKeyHeight)
Parameters
System.Double
singleKeyWidth
The width in pixels of a single key. |
System.Double
singleKeyHeight
The height in pixels of a single key. |