ICommandSourceExtensions
Wisej.Web.Markup.ICommandSourceExtensions
Last updated
Was this helpful?
Wisej.Web.Markup.ICommandSourceExtensions
Last updated
Was this helpful?
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ICommandSource interface.
public class ICommandSourceExtensions
Sets the Command property of the specified ICommandSource.
TCommandSource
button
The command source for which to set the Command property.
value
Returns: TCommandSource. The modified command source with the updated Command property.
This method allows you to associate a command with the command source, enabling command-based interactions.
myCommandSource.Command(new RelayCommand());
Attaches an event handler for the CommandChanged event of the specified ICommandSource.
TCommandSource
button
The command source to attach the event handler to.
action
An action to execute when the command changes.
Returns: TCommandSource. The modified command source with the attached CommandChanged event handler.
This method allows you to execute a custom action whenever the command associated with the command source changes.
myCommandSource.OnCommandChanged(cs =>
{
AlertBox.Show("Command changed!");
});
The type of the command source, must implement .
The to associate with the command source.
The type of the command source, must implement .