CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
Csla.Xaml.TriggerAction Class Reference

Control used to invoke a method on the DataContext based on an event being raised by a UI control. More...

Inheritance diagram for Csla.Xaml.TriggerAction:

Public Member Functions

 TriggerAction ()
 Creates an instance of the object.

Static Public Attributes

static readonly DependencyProperty TargetControlProperty
 Gets or sets the target UI control.
static readonly DependencyProperty TriggerEventProperty
 Gets or sets the name of the event that will trigger the action.
static readonly DependencyProperty MethodNameProperty
 Gets or sets the name of the method to be invoked.
static readonly DependencyProperty MethodParameterProperty
 Gets or sets the value of a parameter to be passed to the invoked method.
static readonly DependencyProperty RebindParameterDynamicallyProperty
 Gets or sets a value indicating whether the MethodParameter value should be dynamically rebound before invoking the target method.

Properties

FrameworkElement? TargetControl [get, set]
 Gets or sets the target UI control.
string TriggerEvent [get, set]
 Gets or sets the name of the event that will trigger the action.
string? MethodName [get, set]
 Gets or sets the name of the method to be invoked.
object? MethodParameter [get, set]
 Gets or sets the value of a parameter to be passed to the invoked method.
bool RebindParameterDynamically [get, set]
 Gets or sets a value indicating whether the MethodParameter value should be dynamically rebound before invoking the target method.

Detailed Description

Control used to invoke a method on the DataContext based on an event being raised by a UI control.

Constructor & Destructor Documentation

◆ TriggerAction()

Csla.Xaml.TriggerAction.TriggerAction ( )
inline

Creates an instance of the object.

Member Data Documentation

◆ MethodNameProperty

readonly DependencyProperty Csla.Xaml.TriggerAction.MethodNameProperty
static
Initial value:
=
DependencyProperty.Register(nameof(MethodName), typeof(string),
typeof(TriggerAction), new PropertyMetadata(null))
TriggerAction()
Creates an instance of the object.
Definition TriggerAction.cs:26
string? MethodName
Gets or sets the name of the method to be invoked.
Definition TriggerAction.cs:202

Gets or sets the name of the method to be invoked.

◆ MethodParameterProperty

readonly DependencyProperty Csla.Xaml.TriggerAction.MethodParameterProperty
static
Initial value:
=
DependencyProperty.Register(nameof(MethodParameter), typeof(object),
typeof(TriggerAction), new PropertyMetadata(null))
object? MethodParameter
Gets or sets the value of a parameter to be passed to the invoked method.
Definition TriggerAction.cs:220

Gets or sets the value of a parameter to be passed to the invoked method.

◆ RebindParameterDynamicallyProperty

readonly DependencyProperty Csla.Xaml.TriggerAction.RebindParameterDynamicallyProperty
static
Initial value:
=
DependencyProperty.Register(nameof(RebindParameterDynamically), typeof(bool),
typeof(TriggerAction), new PropertyMetadata(null))
bool RebindParameterDynamically
Gets or sets a value indicating whether the MethodParameter value should be dynamically rebound befor...
Definition TriggerAction.cs:240

Gets or sets a value indicating whether the MethodParameter value should be dynamically rebound before invoking the target method.

◆ TargetControlProperty

readonly DependencyProperty Csla.Xaml.TriggerAction.TargetControlProperty
static
Initial value:
=
DependencyProperty.Register(nameof(TargetControl), typeof(FrameworkElement),
typeof(TriggerAction), new PropertyMetadata((o, e) =>
{
var ta = (TriggerAction)o;
ta.HookEvent(
(FrameworkElement?)e.OldValue, ta.TriggerEvent, (FrameworkElement?)e.NewValue, ta.TriggerEvent);
}))
FrameworkElement? TargetControl
Gets or sets the target UI control.
Definition TriggerAction.cs:161

Gets or sets the target UI control.

◆ TriggerEventProperty

readonly DependencyProperty Csla.Xaml.TriggerAction.TriggerEventProperty
static
Initial value:
=
DependencyProperty.Register(nameof(TriggerEvent), typeof(string),
typeof(TriggerAction), new PropertyMetadata("Click", (o, e) =>
{
var ta = (TriggerAction)o;
ta.HookEvent(ta.TargetControl, (string)e.OldValue, ta.TargetControl, (string)e.NewValue);
}))
string TriggerEvent
Gets or sets the name of the event that will trigger the action.
Definition TriggerAction.cs:184

Gets or sets the name of the event that will trigger the action.

Property Documentation

◆ MethodName

string? Csla.Xaml.TriggerAction.MethodName
getset

Gets or sets the name of the method to be invoked.

◆ MethodParameter

object? Csla.Xaml.TriggerAction.MethodParameter
getset

Gets or sets the value of a parameter to be passed to the invoked method.

◆ RebindParameterDynamically

bool Csla.Xaml.TriggerAction.RebindParameterDynamically
getset

Gets or sets a value indicating whether the MethodParameter value should be dynamically rebound before invoking the target method.

◆ TargetControl

FrameworkElement? Csla.Xaml.TriggerAction.TargetControl
getset

Gets or sets the target UI control.

◆ TriggerEvent

string Csla.Xaml.TriggerAction.TriggerEvent
getset

Gets or sets the name of the event that will trigger the action.

Exceptions
ArgumentNullExceptionTriggerEvent is null.

The documentation for this class was generated from the following file: