Exemplo n.º 1
0
        private static object CoerceSelectedObject(DependencyObject d, object value)
        {
            PropertyGrid pg = d as PropertyGrid;

            object[] collection = pg.GetValue(SelectedObjectsProperty) as object[];

            return(collection.Length == 0 ? null : value);
        }
Exemplo n.º 2
0
        private static object CoerceSelectedObjects(DependencyObject d, object value)
        {
            PropertyGrid pg = d as PropertyGrid;

            object single = pg.GetValue(SelectedObjectsProperty);

            return(single == null ? new object[0] : value);
        }