CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Xaml.PropertyStatus Class Reference

Displays validation information for a business object property, and manipulates an associated UI control based on the business object's authorization rules. More...

Inheritance diagram for Csla.Xaml.PropertyStatus:

Public Member Functions

 PropertyStatus ()
 Creates an instance of the object. More...
 
override void OnApplyTemplate ()
 Applies the visual template. More...
 

Static Public Attributes

static readonly DependencyProperty PropertyProperty
 Gets or sets the source business property to which this control is bound. More...
 
static readonly DependencyProperty BrokenRulesProperty
 Gets the broken rules collection from the business object. More...
 

Protected Member Functions

virtual void SetSource (bool propertyValueChanged)
 Sets the source binding and updates status. More...
 
virtual void SetSource (object dataItem)
 Sets the source binding and updates status. More...
 
object GetRealSource (object source, string bindingPath)
 Gets the real source helper method. More...
 
virtual void UpdateState ()
 Updates the state on control Property. More...
 
virtual void ClearState ()
 Clears the state. More...
 
virtual void GoToState (bool useTransitions)
 Updates the status of the Property in UI More...
 
DependencyObject FindChild (DependencyObject parent, string name)
 Find child dependency property. More...
 
virtual void OnPropertyChanged (string propertyName)
 Raises the PropertyChanged event. More...
 

Properties

bool IsReadOnly [getset]
 Gets or sets a value indicating whether this DependencyProperty field is read only. More...
 
object Property [getset]
 Gets or sets the source business property to which this control is bound. More...
 
object Source [getset]
 Gets or sets the Source. More...
 
string BindingPath [getset]
 Gets or sets the binding path. More...
 
string PropertyName [getset]
 Gets or sets the name of the property. More...
 
ObservableCollection< BrokenRuleBrokenRules [get]
 Gets the broken rules collection from the business object. More...
 
bool CanRead [getprotected set]
 Gets a value indicating whether the user is authorized to read the property. More...
 
bool CanWrite [getprotected set]
 Gets a value indicating whether the user is authorized to write the property. More...
 
bool IsBusy [get]
 Gets a value indicating whether the property is busy with an asynchronous operation. More...
 
bool IsValid [get]
 Gets a value indicating whether the property is valid. More...
 
RuleSeverity RuleSeverity [get]
 Gets a valud indicating the worst severity of all broken rules for this property (if IsValid is false). More...
 
string RuleDescription [get]
 Gets the description of the most severe broken rule for this property. More...
 

Events

PropertyChangedEventHandler PropertyChanged
 Event raised when a property has changed. More...
 

Detailed Description

Displays validation information for a business object property, and manipulates an associated UI control based on the business object's authorization rules.

Definition at line 37 of file PropertyStatus.cs.

Constructor & Destructor Documentation

◆ PropertyStatus()

Csla.Xaml.PropertyStatus.PropertyStatus ( )

Creates an instance of the object.

Definition at line 72 of file PropertyStatus.cs.

Member Function Documentation

◆ ClearState()

virtual void Csla.Xaml.PropertyStatus.ClearState ( )
protectedvirtual

Clears the state.

Must be called whenever the DataContext is updated (and new object is selected).

Definition at line 628 of file PropertyStatus.cs.

◆ FindChild()

DependencyObject Csla.Xaml.PropertyStatus.FindChild ( DependencyObject  parent,
string  name 
)
protected

Find child dependency property.

Parameters
parentThe parent.
nameThe name.
Returns
DependencyObject child

Definition at line 678 of file PropertyStatus.cs.

◆ GetRealSource()

object Csla.Xaml.PropertyStatus.GetRealSource ( object  source,
string  bindingPath 
)
protected

Gets the real source helper method.

Parameters
sourceThe source.
bindingPathThe binding path.
Returns

Definition at line 264 of file PropertyStatus.cs.

◆ GoToState()

virtual void Csla.Xaml.PropertyStatus.GoToState ( bool  useTransitions)
protectedvirtual

Updates the status of the Property in UI

Parameters
useTransitionsif set to true then use transitions.

Definition at line 639 of file PropertyStatus.cs.

◆ OnApplyTemplate()

override void Csla.Xaml.PropertyStatus.OnApplyTemplate ( )

Applies the visual template.

Definition at line 106 of file PropertyStatus.cs.

◆ OnPropertyChanged()

virtual void Csla.Xaml.PropertyStatus.OnPropertyChanged ( string  propertyName)
protectedvirtual

Raises the PropertyChanged event.

Parameters
propertyNameName of the changed property.

Definition at line 710 of file PropertyStatus.cs.

◆ SetSource() [1/2]

virtual void Csla.Xaml.PropertyStatus.SetSource ( bool  propertyValueChanged)
protectedvirtual

Sets the source binding and updates status.

Definition at line 201 of file PropertyStatus.cs.

◆ SetSource() [2/2]

virtual void Csla.Xaml.PropertyStatus.SetSource ( object  dataItem)
protectedvirtual

Sets the source binding and updates status.

Definition at line 214 of file PropertyStatus.cs.

◆ UpdateState()

virtual void Csla.Xaml.PropertyStatus.UpdateState ( )
protectedvirtual

Updates the state on control Property.

Definition at line 545 of file PropertyStatus.cs.

Member Data Documentation

◆ BrokenRulesProperty

readonly DependencyProperty Csla.Xaml.PropertyStatus.BrokenRulesProperty
static
Initial value:
= DependencyProperty.Register(
"BrokenRules",
typeof(ObservableCollection<BrokenRule>),
typeof(PropertyStatus),
null)
PropertyStatus()
Creates an instance of the object.

Gets the broken rules collection from the business object.

Definition at line 338 of file PropertyStatus.cs.

◆ PropertyProperty

readonly DependencyProperty Csla.Xaml.PropertyStatus.PropertyProperty
static
Initial value:
= DependencyProperty.Register(
"Property",
typeof(object),
typeof(PropertyStatus),
new PropertyMetadata(new object(), (o, e) =>
{
bool changed = true;
if (e.NewValue == null)
{
if (e.OldValue == null)
changed = false;
}
else if (e.NewValue.Equals(e.OldValue))
{
changed = false;
}
((PropertyStatus)o).SetSource(changed);
}))

Gets or sets the source business property to which this control is bound.

Definition at line 120 of file PropertyStatus.cs.

Property Documentation

◆ BindingPath

string Csla.Xaml.PropertyStatus.BindingPath
getsetprotected

Gets or sets the binding path.

The binding path.

Definition at line 172 of file PropertyStatus.cs.

◆ BrokenRules

ObservableCollection<BrokenRule> Csla.Xaml.PropertyStatus.BrokenRules
get

Gets the broken rules collection from the business object.

Definition at line 349 of file PropertyStatus.cs.

◆ CanRead

bool Csla.Xaml.PropertyStatus.CanRead
getprotected set

Gets a value indicating whether the user is authorized to read the property.

Definition at line 365 of file PropertyStatus.cs.

◆ CanWrite

bool Csla.Xaml.PropertyStatus.CanWrite
getprotected set

Gets a value indicating whether the user is authorized to write the property.

Definition at line 384 of file PropertyStatus.cs.

◆ IsBusy

bool Csla.Xaml.PropertyStatus.IsBusy
get

Gets a value indicating whether the property is busy with an asynchronous operation.

Definition at line 403 of file PropertyStatus.cs.

◆ IsReadOnly

bool Csla.Xaml.PropertyStatus.IsReadOnly
getsetprotected

Gets or sets a value indicating whether this DependencyProperty field is read only.

true if this DependencyProperty is read only; otherwise, false.

Definition at line 52 of file PropertyStatus.cs.

◆ IsValid

bool Csla.Xaml.PropertyStatus.IsValid
get

Gets a value indicating whether the property is valid.

Definition at line 422 of file PropertyStatus.cs.

◆ Property

object Csla.Xaml.PropertyStatus.Property
getset

Gets or sets the source business property to which this control is bound.

Definition at line 144 of file PropertyStatus.cs.

◆ PropertyName

string Csla.Xaml.PropertyStatus.PropertyName
getsetprotected

Gets or sets the name of the property.

The name of the property.

Definition at line 192 of file PropertyStatus.cs.

◆ RuleDescription

string Csla.Xaml.PropertyStatus.RuleDescription
get

Gets the description of the most severe broken rule for this property.

Definition at line 462 of file PropertyStatus.cs.

◆ RuleSeverity

RuleSeverity Csla.Xaml.PropertyStatus.RuleSeverity
get

Gets a valud indicating the worst severity of all broken rules for this property (if IsValid is false).

Definition at line 443 of file PropertyStatus.cs.

◆ Source

object Csla.Xaml.PropertyStatus.Source
getsetprotected

Gets or sets the Source.

The source.

Definition at line 155 of file PropertyStatus.cs.

Event Documentation

◆ PropertyChanged

PropertyChangedEventHandler Csla.Xaml.PropertyStatus.PropertyChanged

Event raised when a property has changed.

Definition at line 704 of file PropertyStatus.cs.