System.Windows.DependencyProperty.Lookup C# (CSharp) Method

Lookup() static private method

static private Lookup ( IntPtr native ) : DependencyProperty
native IntPtr
return DependencyProperty
        internal static DependencyProperty Lookup(IntPtr native)
        {
            DependencyProperty prop;
            return properties.TryGetValue (native, out prop) ? prop : null;
        }

Same methods

DependencyProperty::Lookup ( Kind declaring_kind, string name ) : DependencyProperty
DependencyProperty::Lookup ( Kind declaring_kind, string name, Type property_type ) : DependencyProperty
DependencyProperty::Lookup ( Kind declaring_kind, string name, Type property_type, bool create ) : DependencyProperty

Usage Example

        internal DependencyPropertyChangedEventArgs(IntPtr raw) : this()
        {
            IntPtr uprop = NativeMethods.property_changed_event_args_get_property(raw);

            Property = DependencyProperty.Lookup(uprop);
            if (Property == null)
            {
                throw new Exception(string.Format("DependencyPropertyChangedEventArgs.ctor: Couldn't find the managed DependencyProperty corresponding with native {0}/{1}", uprop, NativeMethods.property_changed_event_args_get_id(raw)));
            }

            OldValue = Value.ToObject(Property.PropertyType, NativeMethods.property_changed_event_args_get_old_value(raw));
            NewValue = Value.ToObject(Property.PropertyType, NativeMethods.property_changed_event_args_get_new_value(raw));
        }
All Usage Examples Of System.Windows.DependencyProperty::Lookup