C# Class Snoop.PropertyInformation

Inheritance: System.Windows.DependencyObject, IComparable, INotifyPropertyChanged
ファイルを表示 Open project: cplotts/snoopwpf Class Usage Examples

Public Properties

Property Type Description
ValueProperty System.Windows.DependencyProperty

Private Properties

Property Type Description
BuildBindingDescriptiveString string
BuildMultiBindingDescriptiveString string
GetAllProperties List
GetExtendedProperties IList
HandleChangeExpiry void
HandleValueChanged void
MergeProperties void
Update void

Public Methods

Method Description
Clear ( ) : void
CollectionIndex ( ) : int
CompareTo ( object obj ) : int
GetNextTypeWithDefaultConstructor ( Type type ) : Type
GetProperties ( object obj ) : List
GetProperties ( object obj, Predicate filter ) : List
HasDefaultConstructor ( Type type ) : bool
IsCollection ( ) : bool
PropertyInformation ( object target, PropertyDescriptor property, string propertyName, string propertyDisplayName ) : System

Normal constructor used when constructing PropertyInformation objects for properties.

PropertyInformation ( object target, object component, string displayName, bool isCopyable = false ) : System

Constructor used when constructing PropertyInformation objects for an item in a collection. In this case, we set the PropertyDescriptor for this object (in the property Property) to be null. This kind of makes since because an item in a collection really isn't a property on a class. That is, in this case, we're really hijacking the PropertyInformation class in order to expose the items in the Snoop property grid.

Teardown ( ) : void

Protected Methods

Method Description
OnPropertyChanged ( string propertyName ) : void
OnValueChanged ( ) : void

Private Methods

Method Description
BuildBindingDescriptiveString ( Binding binding, bool isSinglePath ) : string

Build up a string describing the Binding. Path and ElementName (if present)

BuildMultiBindingDescriptiveString ( IEnumerable bindings ) : string

Build up a string of Paths for a MultiBinding separated by ;

GetAllProperties ( object obj, Attribute attributes ) : List
GetExtendedProperties ( object obj ) : IList

4919 + Delve

HandleChangeExpiry ( object sender, EventArgs e ) : void
HandleValueChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
MergeProperties ( System newProperties, ICollection allProperties ) : void
Update ( ) : void

Method Details

Clear() public method

public Clear ( ) : void
return void

CollectionIndex() public method

public CollectionIndex ( ) : int
return int

CompareTo() public method

public CompareTo ( object obj ) : int
obj object
return int

GetNextTypeWithDefaultConstructor() public static method

public static GetNextTypeWithDefaultConstructor ( Type type ) : Type
type System.Type
return System.Type

GetProperties() public static method

public static GetProperties ( object obj ) : List
obj object
return List

GetProperties() public static method

public static GetProperties ( object obj, Predicate filter ) : List
obj object
filter Predicate
return List

HasDefaultConstructor() public static method

public static HasDefaultConstructor ( Type type ) : bool
type System.Type
return bool

IsCollection() public method

public IsCollection ( ) : bool
return bool

OnPropertyChanged() protected method

protected OnPropertyChanged ( string propertyName ) : void
propertyName string
return void

OnValueChanged() protected method

protected OnValueChanged ( ) : void
return void

PropertyInformation() public method

Normal constructor used when constructing PropertyInformation objects for properties.
public PropertyInformation ( object target, PropertyDescriptor property, string propertyName, string propertyDisplayName ) : System
target object target object being shown in the property grid
property System.ComponentModel.PropertyDescriptor the property around which we are contructing this PropertyInformation object
propertyName string the property name for the property that we use in the binding in the case of a non-dependency property
propertyDisplayName string the display name for the property that goes in the name column
return System

PropertyInformation() public method

Constructor used when constructing PropertyInformation objects for an item in a collection. In this case, we set the PropertyDescriptor for this object (in the property Property) to be null. This kind of makes since because an item in a collection really isn't a property on a class. That is, in this case, we're really hijacking the PropertyInformation class in order to expose the items in the Snoop property grid.
public PropertyInformation ( object target, object component, string displayName, bool isCopyable = false ) : System
target object the item in the collection
component object the collection
displayName string the display name that goes in the name column, i.e. this[x]
isCopyable bool
return System

Teardown() public method

public Teardown ( ) : void
return void

Property Details

ValueProperty public_oe static_oe property

public static DependencyProperty,System.Windows ValueProperty
return System.Windows.DependencyProperty