diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs index d99fb4f83e..24e11c3375 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/BasicMetadata.cs @@ -237,19 +237,27 @@ namespace ICSharpCode.WpfDesign.Designer Metadata.AddPopularControl(typeof(WrapPanel)); Metadata.AddDefaultSize(typeof(UIElement), new Size(120, 100)); - Metadata.AddDefaultSize(typeof(ContentControl), new Size(double.NaN, double.NaN)); + Metadata.AddDefaultSize(typeof(ContentControl), new Size(120, 20)); Metadata.AddDefaultSize(typeof(Button), new Size(75, 23)); - var s1 = new Size(120, double.NaN); + var s1 = new Size(120, 20); Metadata.AddDefaultSize(typeof(Slider), s1); Metadata.AddDefaultSize(typeof(TextBox), s1); Metadata.AddDefaultSize(typeof(PasswordBox), s1); Metadata.AddDefaultSize(typeof(ComboBox), s1); Metadata.AddDefaultSize(typeof(ProgressBar), s1); - var s2 = new Size(120, 20); - Metadata.AddDefaultSize(typeof(ToolBar), s2); - Metadata.AddDefaultSize(typeof(Menu), s2); + Metadata.AddDefaultSize(typeof(ToolBar), s1); + Metadata.AddDefaultSize(typeof(Menu), s1); + + var s2=new Size(120,120); + Metadata.AddDefaultSize(typeof(InkCanvas),s2); + Metadata.AddDefaultSize(typeof(Image),s2); + Metadata.AddDefaultSize(typeof(TreeView),s2); + + var s3=new Size(130,120); + Metadata.AddDefaultSize(typeof(Label),s3); + Metadata.AddDefaultSize(typeof(Expander),s3); } } } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/NumberEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/NumberEditor.xaml.cs index 912e43cc35..86b7704790 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/NumberEditor.xaml.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/NumberEditor.xaml.cs @@ -130,7 +130,7 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors double val; if(double.TryParse(textBox.Text, out val)){ if(PropertyNode.FirstProperty.TypeConverter.IsValid(textBox.Text)){ - if(val >= Minimum && val <= Maximum){ + if(val >= Minimum && val <= Maximum || double.IsNaN(val)){ textBox.Foreground=Brushes.Black; textBox.ToolTip=textBox.Text; }else{