Exemple #1
0
        protected override void SetValue(object obj, object value)
        {
            IObjectInstance objectInsance = obj as IObjectInstance;
            ObjectProperty  property      = objectInsance.LookupProperty(this);

            property.OnUserInput(value);
        }
Exemple #2
0
        // Called when the user edits the property. Sets the property in the wrapped object.
        private void OnPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
        {
            // Get the wrapped object.
            IObjectInstance objectInstance = (IObjectInstance)obj;
            object          wrappedObject  = objectInstance.WrappedObject;
            ObjectProperty  objectProperty = objectInstance.LookupProperty(this);

            if (objectProperty != null)
            {
                // Set the property in the wrapped object.
                object value = obj.GetValue(_dependencyProperty);
                objectProperty.OnUserInput(value);
            }
        }