Class KeyProcessor.KeyCommandListBinderImpl
List of key bindings.
Inherited Members
Namespace: Syncfusion.Shared.Utils.KeyBinding.Implementation
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class KeyCommandListBinderImpl : KeyProcessor.KeyCommandBinderImpl, IKeyCommandListBinder, IKeyCommandBinder
Constructors
KeyCommandListBinderImpl()
For XML Serialization only.
Declaration
public KeyCommandListBinderImpl()
KeyCommandListBinderImpl(KeyProcessor, IKeyCommandListBinder, Keys)
Creates new instance of the class and initializes it.
Declaration
public KeyCommandListBinderImpl(KeyProcessor processor, IKeyCommandListBinder parent, Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| KeyProcessor | processor | Main keys processor. |
| IKeyCommandListBinder | parent | Parent of the list. |
| System.Windows.Forms.Keys | key | Key, the binding is linked to. |
Properties
Item[Keys]
Gets binding for the key.
Declaration
public IKeyCommandBinder this[Keys key] { get; }
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key |
Property Value
| Type |
|---|
| IKeyCommandBinder |
Processor
Gets or sets key processor.
Declaration
public override KeyProcessor Processor { get; set; }
Property Value
| Type |
|---|
| KeyProcessor |
Overrides
SubBundings
Gets or sets array of bindings. Intended just for XML Serialization.
Declaration
public KeyProcessor.KeyCommandBinderImpl[] SubBundings { get; set; }
Property Value
| Type |
|---|
| KeyProcessor.KeyCommandBinderImpl[] |
Methods
BindToBinder(Keys)
Sets binding for the key to the new command.
Declaration
public IKeyCommandListBinder BindToBinder(Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key to be binded. |
Returns
| Type | Description |
|---|---|
| IKeyCommandListBinder | Returns existing binder, or creates new if key was not binded before or was binded to command. |
BindToCommand(Keys, String)
Sets binding of the key to specified command.
Declaration
public IKeyCommand BindToCommand(Keys key, string command)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key to be binded. |
| System.String | command | Name of the command, the key is to be binded to. |
Returns
| Type | Description |
|---|---|
| IKeyCommand | Command if binding compleated successfully, or null of binding failed. |
Remarks
It is not necessary to create command before binding. If it does not exists, it will be created.
FindBinding(Keys[], Int32)
Searches for binding of the keys sequence.
Declaration
public IKeyCommandBinder FindBinding(Keys[] keySequence, int iStart)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys[] | keySequence | Key sequence to find. |
| System.Int32 | iStart | Index in keySequence to start with. |
Returns
| Type | Description |
|---|---|
| IKeyCommandBinder | Bindings, that are assigned to that command. |
FindBindings(String)
Searches for bindings of the command.
Declaration
public IKeyCommandBinder[] FindBindings(string command)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | command | Name of the command. |
Returns
| Type | Description |
|---|---|
| IKeyCommandBinder[] | Bindings, that are assigned to that command. |
ProcessKey(Keys)
Tries to process key.
Declaration
public override bool ProcessKey(Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key to be processed. |
Returns
| Type | Description |
|---|---|
| System.Boolean | True if key was processed. |
Overrides
RemoveBinding(Keys)
Removes any associated binding for the specified key.
Declaration
public void RemoveBinding(Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key to be unbinded. |
ResetCommandLinks()
Reset links to commands, and leaves only by-name references.
Declaration
public override void ResetCommandLinks()