KGySoft.ComponentModel Namespace

The KGySoft.ComponentModel namespace contains TypeConverter implementations for several types as well as base classes for different kind of business object models (such as the ModelBase class), and types for command binding, which provide a technology-agnostic approach for binding events to commands (see ICommand interface for details and examples).

Classes

AddingNewEventArgsTProvides data for the FastBindingList<T>.AddingNew event.
BinaryTypeConverter Provides a type converter to convert any Object to and from base64 encoded String or byte array representations.
Command Contains extension methods for the ICommand and INotifyPropertyChanged types as well as a couple of property binding creation methods for any object.
See the Remarks section of the ICommand interface for details and examples about commands.
CommandBindingErrorEventArgs Provides data for the ICommandBinding.Error event.
CommandBindingsCollection Represents a collection of command bindings. If a component or control uses events, then this class can be used to create and hold the event bindings, regardless of any used technology. When this class is disposed, all the internally subscribed events will be released at once. Removed and replaced bindings will also be disposed.
See the Remarks section of the ICommand interface for details and examples about commands.
CommandState Represents the states of a command for a specific command binding.
See the ICommandState interface for details and the Remarks section of ICommand interface for some examples.
EditableObjectBase Represents an object with editing capabilities by adding ICanEdit implementation to the PersistableObjectBase class. Starting an edit session saves a snapshot of the stored properties, which can be either applied or reverted. Saving and restoring properties works for properties set through the IPersistableObject implementation and the ObservableObjectBase.Set method.

See the online help for the image in the description.
EncodingConverter Provides a type converter to convert Encoding instances to and from String or Int32 representations.
ExecuteCommandEventArgs Provides data for the ICommandBinding.Executing and ICommandBinding.Executed events.
FastBindingListT Provides a generic list that is able to notify its consumer about changes and supports data binding.

See the online help for a more detailed description.
FlagsEnumConverter By extending the EnumConverter, this class provides a type converter for flags Enum instances (not necessarily but typically marked by FlagsAttribute) by providing Boolean properties for each flags in the specific Enum type.
ModelBase Provides a base object for model classes or business objects, which can validate their state, have undo/redo capability and can support committable/revertible editing.

See the online help for the image in the description.
NullStateUpdater Provides an updater, which does not synchronize command state changes to any command source. Adding this updater to a ICommandBinding ensures that no other updater will be called, which are added after the NullStateUpdater. You can add this updater to a ICommandBinding first to disable any other possibly added updater.
ObservableBindingListT Provides a class that combines the features of an ObservableCollectionT and BindingListT. Unlike ObservableCollectionT, can raise the CollectionChanged event also when a property of a contained element changes.

See the online help for a more detailed description.
ObservableObjectBase Provides a base class for component model classes, which can notify their consumer about property changes.
PersistableObjectBase Provides a base class for component model classes, which provide a public access to their internal property storage located in the ObservableObjectBase base class by implementing also the IPersistableObject interface.
For details see the Remarks section.
PropertyChangedEventArgsExtensions Extension methods for the PropertyChangedEventArgs type.
PropertyChangedExtendedEventArgs Represents a PropertyChangedEventArgs with property value. The actual type of the event argument of the ObservableObjectBase.PropertyChanged event is PropertyChangedExtendedEventArgs.
PropertyCommandStateUpdater Provides an updater for the ICommandState entries, which treats state entries as properties on the command sources. When a state entry in the ICommandState changes, this updater tries to set the properties of the same name on the bound sources. For example, if a command represents a UI action bound to a menu item or a button (or both), then changing the Enabled property changes the Enabled property of the bound sources as well. You can adjust the text, shortcuts, associated image, checked state, etc. of the sources similarly.
SimpleCommand Represents a non-parameterized command, which is unaware of its triggering sources and has no bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
SimpleCommandTParam Represents a parameterized command, which is unaware of its triggering sources and has no bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
SortableBindingListT Provides a sortable generic list that is able to notify its consumer about changes and supports data binding.
SourceAwareCommandTEventArgs Represents a non-parameterized command, which is aware of its triggering sources and has no bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
SourceAwareCommandTEventArgs, TParam Represents a parameterized command, which is aware of its triggering sources and has no bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
SourceAwareTargetedCommandTEventArgs, TTarget Represents a non-parameterized command, which is aware of its triggering sources and has one or more bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
SourceAwareTargetedCommandTEventArgs, TTarget, TParam Represents a parameterized command, which is aware of its triggering sources and has one or more bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
StringSegmentConverter Provides a type converter to convert StringSegment instances to and from string.
TargetedCommandTTarget Represents a non-parameterized command, which is unaware of its triggering sources and has one or more bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
TargetedCommandTTarget, TParam Represents parameterized a command, which is unaware of its triggering sources and has one or more bound targets.
See the Remarks section of the ICommand interface for details and examples about commands.
UndoableObjectBase Represents an object with step-by-step undo/redo capabilities by adding ICanUndoRedo implementation to the PersistableObjectBase class. Undoing and redoing works for properties set through the IPersistableObject implementation and the ObservableObjectBase.Set method.

See the online help for the image in the description.
ValidatingObjectBase Represents an object with validating capabilities by adding IValidatingObject implementation to the PersistableObjectBase class.
ValidationResult Represents a validation entry in a ValidationResultsCollection.
ValidationResultsCollection Represents a collection of ValidationResult entries.
VersionConverter Provides a type converter to convert Version instances to and from their String representation.

Interfaces

ICanEdit Represents an object with nested committable and revertible editing capability.
ICanUndo Represents an object with undo capability.
ICanUndoRedo Represents an object with undo and redo capability.
ICommand Represents a command, which can be used to create a binding between an event of one or more sources and zero or more target objects. Can be used easily to bind events with targets with any technology.

See the online help for examples.
ICommandBinding Represents a binding for a command.
ICommandSource Represents source information about the command.
See the Remarks section of the ICommand interface for details and examples about commands.
ICommandSourceTEventArgs Represents source information about the command.
See the Remarks section of the ICommand interface for details and examples about commands.
ICommandState Represents the states of a command for a specific command binding. When a state value is set (e.g. Enabled) it can be applied for all of the command sources. By default, no application occurs but this can be overridden if an ICommandStateUpdater is added to the binding by the ICommandBinding.AddStateUpdater method. For example, if the command sources are UI elements (e.g. a button and a menu item), then the Enabled or any arbitrary state (e.g. text, image, shortcut, etc.) can be applied to the sources as properties.
ICommandStateUpdater Represents an updater for the ICommandState entries that apply the state values on the command source instances. For example, if the command source is a UI element such as a button or menu item, then the Enabled property or any arbitrary state (e.g. text, image, shortcut, etc.) can be applied to the sources.
IPersistableObject Represents an object that can store its own properties and is able to notify its consumer about property changes.
IValidatingObject Represents an object that can be validated.

Enumerations

BindingListDisposeBehavior Represents disposing strategy for the wrapped collection and elements when a FastBindingListT instance is disposed.
CommandBindingErrorContext Represents the context of the ICommandBinding.Error event.
EditableObjectBehavior Represents the behavior of an ICanEdit implementation when it is treated as an IEditableObject.
ValidationSeverity Represents the severity level of a ValidationResult.