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.PropertyInfo Class Reference

Expose metastate information about a property. More...

Inheritance diagram for Csla.Xaml.PropertyInfo:

Public Member Functions

 PropertyInfo ()
 Creates an instance of the object. More...
 
 PropertyInfo (bool testing)
 Creates an instance of the object for testing. More...
 
virtual void UpdateState ()
 Updates the metastate values on control based on the current state of the business object and property. More...
 

Static Public Attributes

static readonly DependencyProperty BrokenRulesProperty
 Gets the broken rules collection from the business object. More...
 
static readonly DependencyProperty MyDataContextProperty
 Used to monitor for changes in the binding path. More...
 
static readonly DependencyProperty RelativeBindingProperty
 Used to monitor for changes in the binding path. More...
 
static readonly DependencyProperty PropertyProperty
 Gets or sets the source business property to which this control is bound. More...
 

Protected Member Functions

virtual BindingExpression ParseRelativeBinding (BindingExpression sourceBinding)
 Checks a binding expression to see if it is a relative source binding used in a control template. More...
 
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...
 
PropertyPath GetRelativePath (object source, string bindingPath)
 Gets the part of the binding path relevant to the given source. More...
 
virtual void OnPropertyChanged (string propertyName)
 Raises the PropertyChanged event. More...
 

Properties

ObservableCollection< BrokenRuleBrokenRules [get]
 Gets the broken rules collection from the business object. More...
 
object Source [getset]
 Gets or sets the Source. More...
 
string BindingPath [getset]
 Gets or sets the binding path. More...
 
object Property [getset]
 Gets or sets the source business property to which this control is bound. More...
 
string ErrorText [get]
 Gets the validation error messages for a property on the Model More...
 
string WarningText [get]
 Gets the validation warning messages for a property on the Model More...
 
string InformationText [get]
 Gets the validation information messages for a property on the Model More...
 
object Value [getset]
 Gets and sets the value of the property on 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 value 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...
 
object CustomTag [getset]
 Gets or sets an arbitrary value associated with this PropertyInfo instance. More...
 

Events

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

Detailed Description

Expose metastate information about a property.

Definition at line 38 of file Csla.Xaml.Shared/PropertyInfo.cs.

Constructor & Destructor Documentation

◆ PropertyInfo() [1/2]

Csla.Xaml.PropertyInfo.PropertyInfo ( )

Creates an instance of the object.

Definition at line 47 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ PropertyInfo() [2/2]

Csla.Xaml.PropertyInfo.PropertyInfo ( bool  testing)

Creates an instance of the object for testing.

Parameters
testingTest mode parameter.

Definition at line 70 of file Csla.Xaml.Shared/PropertyInfo.cs.

Member Function Documentation

◆ GetRealSource()

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

Gets the real source helper method.

Parameters
sourceThe source.
bindingPathThe binding path.
Returns

Definition at line 457 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ GetRelativePath()

PropertyPath Csla.Xaml.PropertyInfo.GetRelativePath ( object  source,
string  bindingPath 
)
protected

Gets the part of the binding path relevant to the given source.

Parameters
sourceThe source.
bindingPathThe binding path.
Returns

Definition at line 483 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ OnPropertyChanged()

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

Raises the PropertyChanged event.

Parameters
propertyNameName of the changed property.

Definition at line 878 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ ParseRelativeBinding()

virtual BindingExpression Csla.Xaml.PropertyInfo.ParseRelativeBinding ( BindingExpression  sourceBinding)
protectedvirtual

Checks a binding expression to see if it is a relative source binding used in a control template.

Parameters
sourceBindingThe binding expression to parse.
Returns
If the source binding is a relative source binding, this method finds the proper dependency property on the parent control and returns the binding expression for that property.

Definition at line 317 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ SetSource() [1/2]

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

Sets the source binding and updates status.

Definition at line 361 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ SetSource() [2/2]

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

Sets the source binding and updates status.

Definition at line 373 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ UpdateState()

virtual void Csla.Xaml.PropertyInfo.UpdateState ( )
virtual

Updates the metastate values on control based on the current state of the business object and property.

Definition at line 790 of file Csla.Xaml.Shared/PropertyInfo.cs.

Member Data Documentation

◆ BrokenRulesProperty

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

Gets the broken rules collection from the business object.

Definition at line 100 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ MyDataContextProperty

readonly DependencyProperty Csla.Xaml.PropertyInfo.MyDataContextProperty
static
Initial value:
=
DependencyProperty.Register("MyDataContext",
typeof(Object),
typeof(PropertyInfo),
new PropertyMetadata(MyDataContextPropertyChanged))

Used to monitor for changes in the binding path.

Definition at line 127 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ PropertyProperty

readonly DependencyProperty Csla.Xaml.PropertyInfo.PropertyProperty
static
Initial value:
= DependencyProperty.Register(
"Property",
typeof(object),
typeof(PropertyInfo),
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;
}
((PropertyInfo)o).SetSource(changed);
}))

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

Definition at line 273 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ RelativeBindingProperty

readonly DependencyProperty Csla.Xaml.PropertyInfo.RelativeBindingProperty
static
Initial value:
=
DependencyProperty.Register("RelativeBinding",
typeof(Object),
typeof(PropertyInfo),
new PropertyMetadata(RelativeBindingPropertyChanged))

Used to monitor for changes in the binding path.

Definition at line 153 of file Csla.Xaml.Shared/PropertyInfo.cs.

Property Documentation

◆ BindingPath

string Csla.Xaml.PropertyInfo.BindingPath
getsetprotected

Gets or sets the binding path.

The binding path.

Definition at line 183 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ BrokenRules

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

Gets the broken rules collection from the business object.

Definition at line 111 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ CanRead

bool Csla.Xaml.PropertyInfo.CanRead
getprotected set

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

Definition at line 649 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ CanWrite

bool Csla.Xaml.PropertyInfo.CanWrite
getprotected set

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

Definition at line 668 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ CustomTag

object Csla.Xaml.PropertyInfo.CustomTag
getset

Gets or sets an arbitrary value associated with this PropertyInfo instance.

Definition at line 765 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ ErrorText

string Csla.Xaml.PropertyInfo.ErrorText
get

Gets the validation error messages for a property on the Model

Returns

Definition at line 574 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ InformationText

string Csla.Xaml.PropertyInfo.InformationText
get

Gets the validation information messages for a property on the Model

Returns

Definition at line 606 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ IsBusy

bool Csla.Xaml.PropertyInfo.IsBusy
get

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

Definition at line 687 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ IsValid

bool Csla.Xaml.PropertyInfo.IsValid
get

Gets a value indicating whether the property is valid.

Definition at line 706 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ Property

object Csla.Xaml.PropertyInfo.Property
getset

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

Definition at line 297 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ RuleDescription

string Csla.Xaml.PropertyInfo.RuleDescription
get

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

Definition at line 746 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ RuleSeverity

RuleSeverity Csla.Xaml.PropertyInfo.RuleSeverity
get

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

Definition at line 727 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ Source

object Csla.Xaml.PropertyInfo.Source
getsetprotected

Gets or sets the Source.

The source.

Definition at line 177 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ Value

object Csla.Xaml.PropertyInfo.Value
getset

Gets and sets the value of the property on the business object.

Definition at line 626 of file Csla.Xaml.Shared/PropertyInfo.cs.

◆ WarningText

string Csla.Xaml.PropertyInfo.WarningText
get

Gets the validation warning messages for a property on the Model

Returns

Definition at line 590 of file Csla.Xaml.Shared/PropertyInfo.cs.

Event Documentation

◆ PropertyChanged

PropertyChangedEventHandler Csla.Xaml.PropertyInfo.PropertyChanged

Event raised when a property has changed.

Definition at line 872 of file Csla.Xaml.Shared/PropertyInfo.cs.