System.Windows.DependencyObject.ReadLocalValue C# (CSharp) Method

ReadLocalValue() public method

public ReadLocalValue ( DependencyProperty dp ) : object
dp DependencyProperty
return object
        public object ReadLocalValue(DependencyProperty dp)
        {
            object val = properties[dp];
            return val == null ? DependencyProperty.UnsetValue : val;
        }

Usage Example

        static BindingExpression GetBindingExp(DependencyObject d, DependencyProperty dp) {
#if !SILVERLIGHT
            return BindingOperations.GetBindingExpression(d, dp);
#else
            if(d is FrameworkElement)
                return ((FrameworkElement)d).GetBindingExpression(dp);
            return d.ReadLocalValue(dp) as BindingExpression;
#endif
        }
All Usage Examples Of System.Windows.DependencyObject::ReadLocalValue