C# Class CustomMarkupExtension.MarkupExtensions.BindingDecoratorBase

Inheritance: System.Windows.Markup.MarkupExtension
ファイルを表示 Open project: RookieOne/WPF-Input-Validation

Private Properties

Property Type Description

Public Methods

Method Description
ProvideValue ( IServiceProvider provider ) : object

This basic implementation just sets a binding on the targeted DependencyObject and returns the appropriate BindingExpressionBase instance.
All this work is delegated to the decorated Binding instance.

Protected Methods

Method Description
TryGetTargetItems ( IServiceProvider provider, DependencyObject &target, DependencyProperty &dp ) : bool

Validates a service provider that was submitted to the ProvideValue method. This method checks whether the provider is null (happens at design time), whether it provides an IProvideValueTarget service, and whether the service's IProvideValueTarget.TargetObject and IProvideValueTarget.TargetProperty properties are valid DependencyObject and DependencyProperty instances.

Method Details

ProvideValue() public method

This basic implementation just sets a binding on the targeted DependencyObject and returns the appropriate BindingExpressionBase instance.
All this work is delegated to the decorated Binding instance.
public ProvideValue ( IServiceProvider provider ) : object
provider IServiceProvider Object that can provide services for the markup /// extension.
return object

TryGetTargetItems() protected method

Validates a service provider that was submitted to the ProvideValue method. This method checks whether the provider is null (happens at design time), whether it provides an IProvideValueTarget service, and whether the service's IProvideValueTarget.TargetObject and IProvideValueTarget.TargetProperty properties are valid DependencyObject and DependencyProperty instances.
protected TryGetTargetItems ( IServiceProvider provider, DependencyObject &target, DependencyProperty &dp ) : bool
provider IServiceProvider The provider to be validated.
target System.Windows.DependencyObject The binding target of the binding.
dp System.Windows.DependencyProperty The target property of the binding.
return bool