New to Telerik UI for .NET MAUIStart a free 30-day trial

A behavior that converts events into command executions.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RadEventToCommandBehavior : BehaviorBase

Inheritance: objectBehaviorBaseRadEventToCommandBehavior

Inherited Members BehaviorBase.AttachedBindable

Constructors

Initializes a new instance of the RadEventToCommandBehavior class.

C#
public RadEventToCommandBehavior()

Fields

CommandParameterProperty

BindableProperty

Identifies the CommandParameter bindable property.

C#
public static readonly BindableProperty CommandParameterProperty

CommandProperty

BindableProperty

Identifies the Command bindable property.

C#
public static readonly BindableProperty CommandProperty

Identifies the EventArgsConverter bindable property.

C#
public static readonly BindableProperty EventArgsConverterProperty

EventNameProperty

BindableProperty

Identifies the EventName bindable property.

C#
public static readonly BindableProperty EventNameProperty

Properties

Gets or sets the command to execute when the event is raised.

C#
public ICommand Command { get; set; }

Gets or sets the parameter to pass to the command.

C#
public object CommandParameter { get; set; }
Property Value:

The command parameter.

EventArgsConverter

IValueConverter

Gets or sets the converter to use for converting event arguments.

C#
public IValueConverter EventArgsConverter { get; set; }
Property Value:

The event arguments converter.

Gets or sets the name of the event to listen for.

C#
public string EventName { get; set; }
Property Value:

The event name.

Methods

Called when the behavior is attached to a bindable object.

C#
protected override void OnAttachedTo(BindableObject bindable)
Parameters:bindableBindableObject

The bindable object to attach to.

Overrides: BehaviorBase.OnAttachedTo(BindableObject)

Called when the behavior is being detached from a bindable object.

C#
protected override void OnDetachingFrom(BindableObject bindable)
Parameters:bindableBindableObject

The bindable object to detach from.

Overrides: BehaviorBase.OnDetachingFrom(BindableObject)