Browse Source

Merge pull request #592 from jogibear9988/master

Bugfixes in WPF Designer
pull/603/head
Andreas Weizel 11 years ago
parent
commit
fabcc314f2
  1. 27
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs
  2. 2
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs

27
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/Editors/FormatedTextEditor/FormatedTextEditor.xaml.cs

@ -93,15 +93,24 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid.Editors.FormatedTextEditor @@ -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;
}

2
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.XamlDom/Project/XamlProperty.cs

@ -238,7 +238,7 @@ namespace ICSharpCode.WpfDesign.XamlDom @@ -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 {

Loading…
Cancel
Save