Пример #1
0
 public void Do(IDocumentView doc)
 {
     if (!(doc is Views.SchemaView))
     {
         throw new Exception("this is not schema");
     }
     schemaView = doc as Views.SchemaView;
     schemaView.MainPanel.Children.Add(addedObject);
 }
Пример #2
0
        public void Do(IDocumentView doc)
        {
            schemaView = doc as Views.SchemaView;
            foreach (PropertyDescriptor pd in TypeDescriptor.GetProperties(modifiedObject,
                                                                           new Attribute[] { new PropertyFilterAttribute(PropertyFilterOptions.All) }))
            {
                DependencyPropertyDescriptor dpd =
                    DependencyPropertyDescriptor.FromProperty(pd);

                if (dpd != null &&
                    modifiedObject.ReadLocalValue(dpd.DependencyProperty) != DependencyProperty.UnsetValue &&
                    dpd.GetValue(modifiedObject) != dpd.Metadata.DefaultValue)
                {
                    values.Add(dpd.DependencyProperty, CopyValue(dpd.DependencyProperty));
                }
            }
        }