diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignTimeProperties.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignTimeProperties.cs
index 2fa781de37..9d7e2f5a28 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignTimeProperties.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/DesignTimeProperties.cs
@@ -174,7 +174,31 @@ namespace ICSharpCode.WpfDesign.XamlDom
public static readonly DependencyProperty DesignHeightProperty =
DependencyProperty.RegisterAttached("DesignHeight", typeof(double), typeof(DesignTimeProperties));
#endregion
-
+
+ #region LayoutOverrides
+ ///
+ /// Getter for
+ ///
+ public static string GetLayoutOverrides(DependencyObject obj)
+ {
+ return (string)obj.GetValue(LayoutOverridesProperty);
+ }
+
+ ///
+ /// Setter for
+ ///
+ public static void SetLayoutOverrides(DependencyObject obj, string value)
+ {
+ obj.SetValue(LayoutOverridesProperty, value);
+ }
+
+ ///
+ /// Layout-Overrides
+ ///
+ public static readonly DependencyProperty LayoutOverridesProperty =
+ DependencyProperty.RegisterAttached("LayoutOverrides", typeof(string), typeof(DesignTimeProperties));
+ #endregion
+
#region LayoutRounding
///
/// Getter for
diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs
index 802195fcdb..00004a069f 100644
--- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs
+++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs
@@ -228,6 +228,18 @@ namespace ICSharpCode.WpfDesign.XamlDom
if (this.parentObject.XamlSetTypeConverter != null)
this.ParentObject.XamlSetTypeConverter(this.parentObject.Instance, new XamlSetTypeConverterEventArgs(this.SystemXamlMemberForProperty, null, ((XamlTextValue) propertyValue).Text, this.parentObject.OwnerDocument.GetTypeDescriptorContext(this.parentObject), null));
+
+ if (propertyInfo.DependencyProperty == DesignTimeProperties.DesignWidthProperty) {
+ var widthProperty = this.ParentObject.Properties.FirstOrDefault(x => x.DependencyProperty == FrameworkElement.WidthProperty);
+ if (widthProperty == null || !widthProperty.IsSet)
+ ((FrameworkElement) this.ParentObject.Instance).Width = (double) ValueOnInstance;
+ }
+
+ if (propertyInfo.DependencyProperty == DesignTimeProperties.DesignHeightProperty) {
+ var heightProperty = this.ParentObject.Properties.FirstOrDefault(x => x.DependencyProperty == FrameworkElement.HeightProperty);
+ if (heightProperty == null || !heightProperty.IsSet)
+ ((FrameworkElement)this.ParentObject.Instance).Width = (double)ValueOnInstance;
+ }
}
catch {
Debug.WriteLine("UpdateValueOnInstance() failed");