@@ -32,26 +32,27 @@ static CommandBinder() => _binderImplementation = AppLocator.Current.GetService<
3232
3333 /// <summary>
3434 /// Binds a command from the view model to a control on the view, enabling the control to execute the command with a
35- /// parameter when triggered .
35+ /// specified parameter when an event is raised .
3636 /// </summary>
37- /// <remarks>This method uses reflection to dynamically observe events and properties on the control,
38- /// which may be affected by trimming in some deployment scenarios. The binding remains active until the returned
39- /// IReactiveBinding is disposed.</remarks>
40- /// <typeparam name="TView">The type of the view implementing the IViewFor interface.</typeparam>
41- /// <typeparam name="TViewModel">The type of the view model containing the command property.</typeparam>
42- /// <typeparam name="TProp">The type of the command property, which must implement ICommand.</typeparam>
37+ /// <remarks>This method uses reflection to observe events and properties on the control, which may be
38+ /// affected by trimming in some deployment scenarios. The binding remains active until the returned
39+ /// IReactiveBinding is disposed. If the specified event does not exist on the control, an exception may be thrown
40+ /// at runtime.</remarks>
41+ /// <typeparam name="TView">The type of the view that implements the IViewFor interface.</typeparam>
42+ /// <typeparam name="TViewModel">The type of the view model containing the command to bind.</typeparam>
43+ /// <typeparam name="TProp">The type of the command property on the view model. Must implement ICommand.</typeparam>
4344 /// <typeparam name="TControl">The type of the control on the view to which the command will be bound.</typeparam>
44- /// <typeparam name="TParam">The type of the parameter passed to the command when it is executed .</typeparam>
45- /// <param name="view">The view instance to which the command will be bound. Cannot be null.</param>
46- /// <param name="viewModel">The view model instance containing the command property. May be null if the view is not currently bound to a
47- /// view model.</param>
45+ /// <typeparam name="TParam">The type of the parameter passed to the command when the event is raised .</typeparam>
46+ /// <param name="view">The view instance containing the control to which the command will be bound. Cannot be null.</param>
47+ /// <param name="viewModel">The view model instance containing the command to bind. Used for type inference.
48+ /// Can be null if the binding should be established without an initial view model.</param>
4849 /// <param name="propertyName">An expression identifying the command property on the view model to bind. Cannot be null.</param>
4950 /// <param name="controlName">An expression identifying the control on the view to which the command will be bound. Cannot be null.</param>
5051 /// <param name="withParameter">An observable that provides the parameter to pass to the command when it is executed. Cannot be null.</param>
51- /// <param name="toEvent">The name of the event on the control that triggers the command. If null, a default event is used based on the
52- /// control type.
52+ /// <param name="toEvent">The name of the event on the control that triggers the command execution . If null, a default event is used based
53+ /// on the control type.
5354 /// NOTE: If this parameter is used inside WhenActivated, it's important to dispose the binding when the view is deactivated.</param>
54- /// <returns>An IReactiveBinding instance representing the active binding between the command and the control.</returns>
55+ /// <returns>An IReactiveBinding{TView, TProp} representing the established binding between the command and the control.</returns>
5556 [ RequiresUnreferencedCode ( "Dynamic observation uses reflection over members that may be trimmed." ) ]
5657 public static IReactiveBinding < TView , TProp > BindCommand <
5758 TView ,
@@ -79,25 +80,26 @@ public static IReactiveBinding<TView, TProp> BindCommand<
7980 }
8081
8182 /// <summary>
82- /// Binds a command from the view model to a control on the view, enabling the control to execute the specified
83- /// command when triggered .
83+ /// Binds a command from the view model to a control on the view, enabling the control to execute the command with a
84+ /// specified parameter when an event is raised .
8485 /// </summary>
85- /// <remarks>This method uses reflection to observe events and properties on the control and may be
86- /// affected by trimming in environments that remove unused members . The binding enables the control to execute the
87- /// command when the specified event is raised, and automatically manages the enabled state of the control based on
88- /// the command's CanExecute state .</remarks>
89- /// <typeparam name="TView">The type of the view implementing the IViewFor interface.</typeparam>
90- /// <typeparam name="TViewModel">The type of the view model containing the command property .</typeparam>
91- /// <typeparam name="TProp">The type of the command property to bind, implementing ICommand.</typeparam>
86+ /// <remarks>This method uses reflection to observe events and properties on the control, which may be
87+ /// affected by trimming in some deployment scenarios . The binding remains active until the returned
88+ /// IReactiveBinding is disposed. If the specified event does not exist on the control, an exception may be thrown
89+ /// at runtime .</remarks>
90+ /// <typeparam name="TView">The type of the view that implements the IViewFor interface.</typeparam>
91+ /// <typeparam name="TViewModel">The type of the view model containing the command to bind .</typeparam>
92+ /// <typeparam name="TProp">The type of the command property on the view model. Must implement ICommand.</typeparam>
9293 /// <typeparam name="TControl">The type of the control on the view to which the command will be bound.</typeparam>
93- /// <param name="view">The view instance to which the control belongs. Cannot be null.</param>
94- /// <param name="viewModel">The view model instance containing the command property. Can be null if the view's ViewModel property is used.</param>
94+ /// <param name="view">The view instance containing the control to which the command will be bound. Cannot be null.</param>
95+ /// <param name="viewModel">The view model instance containing the command to bind. Used for type inference.
96+ /// Can be null if the binding should be established without an initial view model.</param>
9597 /// <param name="propertyName">An expression identifying the command property on the view model to bind. Cannot be null.</param>
96- /// <param name="controlName">An expression identifying the control on the view to bind the command to . Cannot be null.</param>
97- /// <param name="toEvent">The name of the event on the control that triggers the command. If null, a default event is used based on the
98- /// control type.
98+ /// <param name="controlName">An expression identifying the control on the view to which the command will be bound . Cannot be null.</param>
99+ /// <param name="toEvent">The name of the event on the control that triggers the command execution . If null, a default event is used based
100+ /// on the control type.
99101 /// NOTE: If this parameter is used inside WhenActivated, it's important to dispose the binding when the view is deactivated.</param>
100- /// <returns>An object representing the binding between the command and the control, which can be disposed to unbind .</returns>
102+ /// <returns>An IReactiveBinding{TView, TProp} representing the established binding between the command and the control.</returns>
101103 [ RequiresUnreferencedCode ( "Dynamic observation uses reflection over members that may be trimmed." ) ]
102104 public static IReactiveBinding < TView , TProp > BindCommand <
103105 TView ,
@@ -123,19 +125,20 @@ public static IReactiveBinding<TView, TProp> BindCommand<
123125
124126 /// <summary>
125127 /// Binds a command from the view model to a control on the view, enabling the control to execute the command with a
126- /// specified parameter when triggered .
128+ /// specified parameter when an event is raised .
127129 /// </summary>
128- /// <remarks>This method uses reflection to observe events and properties on the control and view model,
129- /// which may be affected by trimming in some deployment scenarios. The binding remains active until the returned
130- /// IReactiveBinding is disposed.</remarks>
131- /// <typeparam name="TView">The type of the view implementing the IViewFor interface.</typeparam>
132- /// <typeparam name="TViewModel">The type of the view model containing the command property.</typeparam>
133- /// <typeparam name="TProp">The type of the command property, typically implementing ICommand.</typeparam>
130+ /// <remarks>This method uses reflection to observe events and properties on the control, which may be
131+ /// affected by trimming in some deployment scenarios. The binding remains active until the returned
132+ /// IReactiveBinding is disposed. If the specified event does not exist on the control, an exception may be thrown
133+ /// at runtime.</remarks>
134+ /// <typeparam name="TView">The type of the view that implements the IViewFor interface.</typeparam>
135+ /// <typeparam name="TViewModel">The type of the view model containing the command to bind.</typeparam>
136+ /// <typeparam name="TProp">The type of the command property on the view model. Must implement ICommand.</typeparam>
134137 /// <typeparam name="TControl">The type of the control on the view to which the command will be bound.</typeparam>
135- /// <typeparam name="TParam">The type of the parameter passed to the command when it is executed .</typeparam>
136- /// <param name="view">The view instance containing the control to bind the command to . Cannot be null.</param>
137- /// <param name="viewModel">The view model instance containing the command property. May be null if the view is not currently bound to a
138- /// view model.</param>
138+ /// <typeparam name="TParam">The type of the parameter passed to the command when the event is raised .</typeparam>
139+ /// <param name="view">The view instance containing the control to which the command will be bound . Cannot be null.</param>
140+ /// <param name="viewModel">The view model instance containing the command to bind. Used for type inference.
141+ /// Can be null if the binding should be established without an initial view model.</param>
139142 /// <param name="propertyName">An expression identifying the command property on the view model to bind. Cannot be null.</param>
140143 /// <param name="controlName">An expression identifying the control on the view to which the command will be bound. Cannot be null.</param>
141144 /// <param name="withParameter">An expression specifying the parameter to pass to the command when it is executed. Cannot be null.</param>
0 commit comments