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

Invokes a method on a target object when a trigger event is raised from the attached UI control. More...

Inheritance diagram for Csla.Xaml.InvokeMethod:

Public Member Functions

 InvokeMethod (UIElement ctrl)
 Invokes the target method if all required attached property values have been set.

Static Public Member Functions

static void SetTarget (UIElement ctrl, object? value)
 Sets the object containing the method to be invoked.
static ? object GetTarget (UIElement ctrl)
 Gets the object containing the method to be invoked.
static void SetMethodName (UIElement ctrl, string value)
 Sets the name of method to be invoked.
static string GetMethodName (UIElement ctrl)
 Gets the name of method to be invoked.
static void SetTriggerEvent (UIElement ctrl, string? value)
 Sets the name of event raised by UI control that triggers invoking the target method.
static ? string GetTriggerEvent (UIElement ctrl)
 Gets the name of event raised by UI control that triggers invoking the target method.
static void SetMethodParameter (UIElement ctrl, object? value)
 Sets the parameter value to be passed to invoked method.
static ? object GetMethodParameter (UIElement ctrl)
 Gets the parameter value to be passed to invoked method.

Static Public Attributes

static readonly DependencyProperty TargetProperty
 Object containing the method to be invoked.
static readonly DependencyProperty MethodNameProperty
 Name of method to be invoked.
static readonly DependencyProperty TriggerEventProperty
 Name of event raised by UI control that triggers invoking the target method.
static readonly DependencyProperty MethodParameterProperty
 Parameter value to be passed to invoked method.

Detailed Description

Invokes a method on a target object when a trigger event is raised from the attached UI control.

Constructor & Destructor Documentation

◆ InvokeMethod()

Csla.Xaml.InvokeMethod.InvokeMethod ( UIElement ctrl)
inline

Invokes the target method if all required attached property values have been set.

Parameters
ctrlAttached UI control
Exceptions
ArgumentNullExceptionctrl is null.

Member Function Documentation

◆ GetMethodName()

string Csla.Xaml.InvokeMethod.GetMethodName ( UIElement ctrl)
inlinestatic

Gets the name of method to be invoked.

Parameters
ctrlAttached control
Exceptions
ArgumentNullExceptionctrl is null.

◆ GetMethodParameter()

? object Csla.Xaml.InvokeMethod.GetMethodParameter ( UIElement ctrl)
inlinestatic

Gets the parameter value to be passed to invoked method.

Parameters
ctrlAttached control
Exceptions
ArgumentNullExceptionctrl is null.

◆ GetTarget()

? object Csla.Xaml.InvokeMethod.GetTarget ( UIElement ctrl)
inlinestatic

Gets the object containing the method to be invoked.

Parameters
ctrlAttached control
Exceptions
ArgumentNullExceptionctrl is null.

◆ GetTriggerEvent()

? string Csla.Xaml.InvokeMethod.GetTriggerEvent ( UIElement ctrl)
inlinestatic

Gets the name of event raised by UI control that triggers invoking the target method.

Parameters
ctrlAttached control
Exceptions
ArgumentNullExceptionctrl is null.

◆ SetMethodName()

void Csla.Xaml.InvokeMethod.SetMethodName ( UIElement ctrl,
string value )
inlinestatic

Sets the name of method to be invoked.

Parameters
ctrlAttached control
valueNew value
Exceptions
ArgumentNullExceptionctrl is null.
ArgumentExceptionvalue is null, string.Empty or only consists of white spaces.

◆ SetMethodParameter()

void Csla.Xaml.InvokeMethod.SetMethodParameter ( UIElement ctrl,
object? value )
inlinestatic

Sets the parameter value to be passed to invoked method.

Parameters
ctrlAttached control
valueNew value
Exceptions
ArgumentNullExceptionctrl is null.

◆ SetTarget()

void Csla.Xaml.InvokeMethod.SetTarget ( UIElement ctrl,
object? value )
inlinestatic

Sets the object containing the method to be invoked.

Parameters
ctrlAttached control
valueNew value
Exceptions
ArgumentNullExceptionctrl is null.

◆ SetTriggerEvent()

void Csla.Xaml.InvokeMethod.SetTriggerEvent ( UIElement ctrl,
string? value )
inlinestatic

Sets the name of event raised by UI control that triggers invoking the target method.

Parameters
ctrlAttached control
valueNew value
Exceptions
ArgumentNullExceptionctrl is null.

Member Data Documentation

◆ MethodNameProperty

readonly DependencyProperty Csla.Xaml.InvokeMethod.MethodNameProperty
static
Initial value:
=
DependencyProperty.RegisterAttached("MethodName",
typeof(string),
typeof(InvokeMethod),
new PropertyMetadata(null))
InvokeMethod(UIElement ctrl)
Invokes the target method if all required attached property values have been set.
Definition InvokeMethod.cs:195

Name of method to be invoked.

◆ MethodParameterProperty

readonly DependencyProperty Csla.Xaml.InvokeMethod.MethodParameterProperty
static
Initial value:
=
DependencyProperty.RegisterAttached("MethodParameter",
typeof(object),
typeof(InvokeMethod),
new PropertyMetadata(null))

Parameter value to be passed to invoked method.

◆ TargetProperty

readonly DependencyProperty Csla.Xaml.InvokeMethod.TargetProperty
static
Initial value:
=
DependencyProperty.RegisterAttached("Target",
typeof(object),
typeof(InvokeMethod),
new PropertyMetadata(null))

Object containing the method to be invoked.

◆ TriggerEventProperty

readonly DependencyProperty Csla.Xaml.InvokeMethod.TriggerEventProperty
static
Initial value:
=
DependencyProperty.RegisterAttached("TriggerEvent",
typeof(string),
typeof(InvokeMethod),
new PropertyMetadata((o, _) =>
{
if (o is UIElement ctrl)
new InvokeMethod(ctrl);
}))

Name of event raised by UI control that triggers invoking the target method.


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