CSLA .NET 10.0.0
A home for your business logic
Loading...
Searching...
No Matches
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.
override void OnApplyTemplate ()
 Applies the visual template.

Static Public Attributes

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

Protected Member Functions

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

Properties

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

Events

PropertyChangedEventHandler? PropertyChanged
 Event raised when a property has changed.

Detailed Description

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

Constructor & Destructor Documentation

◆ PropertyStatus()

Csla.Xaml.PropertyStatus.PropertyStatus ( )
inline

Creates an instance of the object.

Member Function Documentation

◆ ClearState()

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

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

◆ FindChild()

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

Find child dependency property.

Parameters
parentThe parent.
nameThe name.
Returns
DependencyObject child
Exceptions
ArgumentNullExceptionparent is null.

◆ GetRealSource()

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

Gets the real source helper method.

Parameters
sourceThe source.
bindingPathThe binding path.
Exceptions
ArgumentNullExceptionbindingPath is null.

◆ GoToState()

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

Updates the status of the Property in UI.

Parameters
useTransitionsif set to true then use transitions.

◆ OnApplyTemplate()

override void Csla.Xaml.PropertyStatus.OnApplyTemplate ( )
inline

Applies the visual template.

◆ OnPropertyChanged()

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

Raises the PropertyChanged event.

Parameters
propertyNameName of the changed property.
Exceptions
ArgumentNullExceptionpropertyName is null.

◆ SetSource() [1/2]

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

Sets the source binding and updates status.

◆ SetSource() [2/2]

virtual void Csla.Xaml.PropertyStatus.SetSource ( object? dataItem)
inlineprotectedvirtual

Sets the source binding and updates status.

◆ UpdateState()

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

Updates the state on control Property.

Member Data Documentation

◆ BrokenRulesProperty

readonly DependencyProperty Csla.Xaml.PropertyStatus.BrokenRulesProperty
static
Initial value:
= DependencyProperty.Register(
nameof(BrokenRules),
typeof(ObservableCollection<BrokenRule>),
null)
ObservableCollection< BrokenRule > BrokenRules
Gets the broken rules collection from the business object.
Definition PropertyInfo.cs:115
PropertyStatus()
Creates an instance of the object.
Definition PropertyStatus.cs:60

Gets the broken rules collection from the business object.

◆ PropertyProperty

readonly DependencyProperty Csla.Xaml.PropertyStatus.PropertyProperty
static
Initial value:
= DependencyProperty.Register(
nameof(Property),
typeof(object),
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);
}))
object? Property
Gets or sets the source business property to which this control is bound.
Definition PropertyInfo.cs:301
Displays validation information for a business object property, and manipulates an associated UI cont...
Definition PropertyStatus.cs:37

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

Property Documentation

◆ BindingPath

string Csla.Xaml.PropertyStatus.BindingPath = string.Empty
getsetprotected

Gets or sets the binding path.

The binding path.

◆ BrokenRules

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

Gets the broken rules collection from the business object.

◆ CanRead

bool Csla.Xaml.PropertyStatus.CanRead
getprotected set

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

◆ CanWrite

bool Csla.Xaml.PropertyStatus.CanWrite
getprotected set

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

◆ IsBusy

bool Csla.Xaml.PropertyStatus.IsBusy
get

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

◆ IsReadOnly

bool Csla.Xaml.PropertyStatus.IsReadOnly = false
getsetprotected

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

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

◆ IsValid

bool Csla.Xaml.PropertyStatus.IsValid
get

Gets a value indicating whether the property is valid.

◆ Property

object? Csla.Xaml.PropertyStatus.Property
getset

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

◆ PropertyName

string Csla.Xaml.PropertyStatus.PropertyName = string.Empty
getsetprotected

Gets or sets the name of the property.

The name of the property.

◆ RuleDescription

string Csla.Xaml.PropertyStatus.RuleDescription
get

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

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

◆ Source

object? Csla.Xaml.PropertyStatus.Source = null
getsetprotected

Gets or sets the Source.

The source.

Event Documentation

◆ PropertyChanged

PropertyChangedEventHandler? Csla.Xaml.PropertyStatus.PropertyChanged

Event raised when a property has changed.


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