CreatesWinformsCommandBinding class¶
Defined in
Namespace: ReactiveUI.Winforms
Assembly: ReactiveUI.Winforms.dll
Full name: ReactiveUI.Winforms.CreatesWinformsCommandBinding
Modifiers: public sealed
Summary¶
Default command binder for Windows Forms controls that connects an ICommand to an event on a target object.
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net462, net481
Class hierarchy
classDiagram
class CreatesWinformsCommandBinding
class ICreatesCommandBinding {
<>
}
ICreatesCommandBinding <|.. CreatesWinformsCommandBinding
Implements: ICreatesCommandBinding
Remarks¶
This binder supports a small set of conventional "default" events (for example, Click, MouseUp),
and can also bind to an explicitly named event.
Reflection-based event lookup and string-based event subscription are not trimming/AOT-safe in general. Use the generic overloads with explicit add/remove handler delegates to avoid the reflection cost.
Constructors¶
| Name | Summary |
|---|---|
| .ctor |
Methods¶
| Name | Summary |
|---|---|
| GetAffinityForObject | Returns a positive integer when this class supports binding a command to an object of the specified type. If the binding is not supported, the method will return a... |
| BindCommandToObject | Binds a command to the default event on a Windows Forms control. This method uses direct type checking and the AOT-safe add/remove handler overload instead of reflection. |