CSLA.NET 5.4.2
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
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. More...
 

Static Public Member Functions

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

Static Public Attributes

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

Detailed Description

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

Definition at line 23 of file InvokeMethod.cs.

Constructor & Destructor Documentation

◆ InvokeMethod()

Csla.Xaml.InvokeMethod.InvokeMethod ( UIElement  ctrl)

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

Parameters
ctrlAttached UI control

Definition at line 188 of file InvokeMethod.cs.

Member Function Documentation

◆ GetMethodName()

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

Gets the name of method to be invoked.

Parameters
ctrlAttached control

Definition at line 89 of file InvokeMethod.cs.

◆ GetMethodParameter()

static object Csla.Xaml.InvokeMethod.GetMethodParameter ( UIElement  ctrl)
static

Gets the parameter value to be passed to invoked method.

Parameters
ctrlAttached control

Definition at line 153 of file InvokeMethod.cs.

◆ GetTarget()

static object Csla.Xaml.InvokeMethod.GetTarget ( UIElement  ctrl)
static

Gets the object containing the method to be invoked.

Parameters
ctrlAttached control

Definition at line 50 of file InvokeMethod.cs.

◆ GetTriggerEvent()

static string Csla.Xaml.InvokeMethod.GetTriggerEvent ( UIElement  ctrl)
static

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

Parameters
ctrlAttached control

Definition at line 125 of file InvokeMethod.cs.

◆ SetMethodName()

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

Sets the name of method to be invoked.

Parameters
ctrlAttached control
valueNew value

Definition at line 80 of file InvokeMethod.cs.

◆ SetMethodParameter()

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

Sets the parameter value to be passed to invoked method.

Parameters
ctrlAttached control
valueNew value

Definition at line 144 of file InvokeMethod.cs.

◆ SetTarget()

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

Sets the object containing the method to be invoked.

Parameters
ctrlAttached control
valueNew value

Definition at line 41 of file InvokeMethod.cs.

◆ SetTriggerEvent()

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

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

Parameters
ctrlAttached control
valueNew value

Definition at line 115 of file InvokeMethod.cs.

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.

Name of method to be invoked.

Definition at line 69 of file InvokeMethod.cs.

◆ 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.

Definition at line 133 of file InvokeMethod.cs.

◆ 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.

Definition at line 30 of file InvokeMethod.cs.

◆ TriggerEventProperty

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

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

Definition at line 98 of file InvokeMethod.cs.