ClassVirtualKeyboardLayoutPanel
Represents a class that hosts all BaseVirtualKeyboardLayout instances and contains the layout implementation. This class also has several predefined layouts panels.
Definition
Namespace:Telerik.WinControls.VirtualKeyboard
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class VirtualKeyboardLayoutPanel : BaseVirtualKeyboardLayout, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IStylableNode, IVirtualKeyboardLayout
Inheritance: objectDisposableObjectRadObjectRadElementBaseVirtualKeyboardLayoutVirtualKeyboardLayoutPanel
Derived Classes:
Implements:
Inherited Members
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
orientation
The orientation of KeyboardLayouts.
Properties
KeyDefaultSize
Gets or sets the default size in pixels for keys.
KeyboardLayouts
Gets a collection of all added BaseVirtualKeyboardLayout instances.
Declaration
public ObservableCollection<BaseVirtualKeyboardLayout> KeyboardLayouts { get; }
Property Value
LayoutSpacing
Gets or sets the spacing between each BaseVirtualKeyboardLayout in KeyboardLayouts.
Orientation
Gets or sets the way how KeyboardLayouts are arranged. Default value is Horizontal.
Declaration
public Orientation Orientation { get; set; }
Property Value
TotalColumnsCount
Gets the total number of logical columns.
Declaration
public override double TotalColumnsCount { get; }
Property Value
Overrides
TotalRowsCount
Gets the total number of logical rows.
Declaration
public override double TotalRowsCount { get; }
Property Value
Overrides
Methods
ArrangeHorizontally(SizeF)
Arranges the KeyboardLayouts horizontally.
Declaration
protected virtual void ArrangeHorizontally(SizeF finalSize)
Parameters
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
finalSize
The size that is available for element.
Returns
The rectangle occupied by the element. Usually finalSize. Should you return different size, the Layout system will restart measuring and rearranging the items. That could lead to infinite recursion.
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
finalSize
The final size.
CreateExtendedKeyboardLayout(bool)
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
addFunctionKeys
A value indicating whether to include the function keys group.
Returns
The created instance.
CreateKeyboardLayout(bool, bool, bool, bool)
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
addFunctionKeys
A value indicating whether to include the function keys group.
addNumpadGroup
A value indicating whether to include the numpad keys group.
addHomeGroup
A value indicating whether to include the home keyboard buttons group.
addArrowsInMainGroup
A value indicating whether to include the arrow keys in the main group.
Returns
The created instance.
CreateNumpadLayout(bool)
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
defaultLayout
If true loads the default Numpad buttons layout(numlock button is on the bottom), otherwise the traditional(numlock is on top).
Returns
The created instance.
CreateSimplifiedKeyboardLayout(bool)
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
addHomeGroup
A value indicating whether to include the home keyboard buttons group.
Returns
The created instance.
GetAllKeys()
Gets a list with all IKey instances in this object and its children.
Declaration
public override IList<IKey> GetAllKeys()
Returns
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
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
availableSize
The size that is available to the VirtualKeyboardLayoutPanel. The available size can be infinity (to take the full size of the element)
Returns
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
child
The child.
Returns
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.