Class KeyProcessor
Represnts a class that contains main key processor.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Shared.Utils.KeyBinding.Implementation
Assembly: Syncfusion.Edit.Windows.dll
Syntax
public class KeyProcessor : IEditableObject, ISerializable
Constructors
KeyProcessor()
Initializes a new instance of the KeyProcessor class. and bindings list within it.
Declaration
public KeyProcessor()
KeyProcessor(Stream)
Initializes a new instance of the KeyProcessor class.
Declaration
public KeyProcessor(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Stream to read bindings from. |
Properties
Binder
Gets root key binder.
Declaration
public IKeyCommandListBinder Binder { get; }
Property Value
| Type |
|---|
| IKeyCommandListBinder |
Commands
Gets list of commands.
Declaration
public IKeyCommandList Commands { get; }
Property Value
| Type |
|---|
| IKeyCommandList |
Converter
Gets key converter.
Declaration
public KeysConverter Converter { get; }
Property Value
| Type |
|---|
| System.Windows.Forms.KeysConverter |
Methods
AppendKeyBindings(Object, Boolean, Boolean)
Adds commands and keybindings.
Declaration
public void AppendKeyBindings(object instance, bool addCommands, bool addKeys)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | instance | Instance to analyse. |
| System.Boolean | addCommands | Indicates whether commands should be added. |
| System.Boolean | addKeys | Indicates whether keys should be added. |
BeginEdit()
Starts editing.
Declaration
public void BeginEdit()
CancelEdit()
Cancels all changes.
Declaration
public void CancelEdit()
DefaultInitialization()
Performs default initialization.
Declaration
protected void DefaultInitialization()
EndEdit()
Submits all changes.
Declaration
public void EndEdit()
GetObjectData(SerializationInfo, StreamingContext)
Serializes list.
Declaration
public void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Runtime.Serialization.SerializationInfo | info | Serialization info. |
| System.Runtime.Serialization.StreamingContext | context | Serialization context. |
InitializeClassDefaults(IKeyBinderContainer)
Scans for commands and key-bindings in custom attributes of all public methods of the class.
Declaration
public void InitializeClassDefaults(IKeyBinderContainer instance)
Parameters
| Type | Name | Description |
|---|---|---|
| IKeyBinderContainer | instance | Instance to be scanned. |
InitializeCommandsList(IKeyBinderContainer)
Initializes list of the commands.
Declaration
public void InitializeCommandsList(IKeyBinderContainer instance)
Parameters
| Type | Name | Description |
|---|---|---|
| IKeyBinderContainer | instance |
LoadBindingsFromXML(Stream)
Loads bindings from XML.
Declaration
public void LoadBindingsFromXML(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Input stream. |
OnUnprocessedKey(Keys)
Raises UnprocessedKey event.
Declaration
protected virtual void OnUnprocessedKey(Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key, that was not processed. |
ProcessKey(Keys)
Process key.
Declaration
public void ProcessKey(Keys key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Forms.Keys | key | Key to be processed. |
SaveBindingsToXML(Stream)
Saves bindings to XML.
Declaration
public void SaveBindingsToXML(Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IO.Stream | stream | Output stream. |
Events
UnprocessedKey
Event, that is raised when some key was unprocesses.
Declaration
public event ProcessCommandsEventHandler UnprocessedKey
Event Type
| Type |
|---|
| ProcessCommandsEventHandler |