Browse Source

Better Default Values for Rectangle, Ellipse, Shape...

pull/637/head
jkuehner 11 years ago
parent
commit
5088e7b786
  1. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs
  2. 12
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/Initializers.cs

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs

@ -296,10 +296,18 @@ namespace ICSharpCode.WpfDesign.Designer @@ -296,10 +296,18 @@ namespace ICSharpCode.WpfDesign.Designer
Metadata.AddDefaultPropertyValue(typeof(Line), Line.Y1Property, 0.0);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.X2Property, 20.0);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.Y2Property, 20.0);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.StrokeProperty, Colors.Black);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.StrokeProperty, Brushes.Black);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.StrokeThicknessProperty, 2d);
Metadata.AddDefaultPropertyValue(typeof(Line), Line.StretchProperty, Stretch.None);
Metadata.AddDefaultPropertyValue(typeof(Rectangle), Rectangle.FillProperty, Brushes.Transparent);
Metadata.AddDefaultPropertyValue(typeof(Rectangle), Rectangle.StrokeProperty, Brushes.Black);
Metadata.AddDefaultPropertyValue(typeof(Rectangle), Rectangle.StrokeThicknessProperty, 2d);
Metadata.AddDefaultPropertyValue(typeof(Ellipse), Ellipse.FillProperty, Brushes.Transparent);
Metadata.AddDefaultPropertyValue(typeof(Ellipse), Ellipse.StrokeProperty, Brushes.Black);
Metadata.AddDefaultPropertyValue(typeof(Ellipse), Ellipse.StrokeThicknessProperty, 2d);
}
}
}

12
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/Initializers.cs

@ -97,16 +97,4 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers @@ -97,16 +97,4 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions.Initializers
}
}
}
[ExtensionFor(typeof(Shape))]
public class ShapeInitializer : DefaultInitializer
{
public override void InitializeDefaults(DesignItem item)
{
DesignItemProperty fillProperty = item.Properties["Fill"];
if (fillProperty.ValueOnInstance == null) {
fillProperty.SetValue(Brushes.YellowGreen);
}
}
}
}

Loading…
Cancel
Save