ICommandSourceExtensions
Wisej.Web.Markup.ICommandSourceExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ICommandSource interface.
public class ICommandSourceExtensions
Methods
Command<TCommandSource>(button, value)

Sets the Command property of the specified ICommandSource.
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());
OnCommandChanged<TCommandSource>(button, action)

Attaches an event handler for the CommandChanged event of the specified ICommandSource.
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!");
});
Last updated
Was this helpful?