diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs index 82ccca516f..720bd79d8d 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs @@ -93,15 +93,24 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor retVal = new Run(((Run) inline).Text); } - retVal.Background = inline.Background; - retVal.Foreground = inline.Foreground; - retVal.FontFamily = inline.FontFamily; - retVal.FontSize = inline.FontSize; - retVal.FontStretch = inline.FontStretch; - retVal.FontStyle = inline.FontStyle; - retVal.FontWeight = inline.FontWeight; - retVal.TextEffects = inline.TextEffects; - retVal.TextDecorations = inline.TextDecorations; + if (inline.ReadLocalValue(Inline.BackgroundProperty) != DependencyProperty.UnsetValue) + retVal.Background = inline.Background; + if (inline.ReadLocalValue(Inline.ForegroundProperty) != DependencyProperty.UnsetValue) + retVal.Foreground = inline.Foreground; + if (inline.ReadLocalValue(Inline.FontFamilyProperty) != DependencyProperty.UnsetValue) + retVal.FontFamily = inline.FontFamily; + if (inline.ReadLocalValue(Inline.FontSizeProperty) != DependencyProperty.UnsetValue) + retVal.FontSize = inline.FontSize; + if (inline.ReadLocalValue(Inline.FontStretchProperty) != DependencyProperty.UnsetValue) + retVal.FontStretch = inline.FontStretch; + if (inline.ReadLocalValue(Inline.FontStyleProperty) != DependencyProperty.UnsetValue) + retVal.FontStyle = inline.FontStyle; + if (inline.ReadLocalValue(Inline.FontWeightProperty) != DependencyProperty.UnsetValue) + retVal.FontWeight = inline.FontWeight; + if (inline.ReadLocalValue(Inline.TextEffectsProperty) != DependencyProperty.UnsetValue) + retVal.TextEffects = inline.TextEffects; + if (inline.ReadLocalValue(Inline.TextDecorationsProperty) != DependencyProperty.UnsetValue) + retVal.TextDecorations = inline.TextDecorations; return retVal; } diff --git a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs index 00004a069f..929d58b6b8 100644 --- a/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs +++ b/src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs @@ -238,7 +238,7 @@ namespace ICSharpCode.WpfDesign.XamlDom 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; + ((FrameworkElement)this.ParentObject.Instance).Height = (double)ValueOnInstance; } } catch {