Browse Source

- Resize snaplines bugfix

- Async PropertyGrid.Reload()

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3426 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Ivan Shumilin 17 years ago
parent
commit
fb4e3c1e98
  1. 10
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs
  2. 9
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGrid.cs

10
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs

@ -96,8 +96,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -96,8 +96,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
if (operation.Type == PlacementType.Resize) {
if (info.ResizeThumbAlignment.Vertical == VerticalAlignment.Top) {
bounds.Y += delta;
bounds.Height = Math.Max(0, bounds.Height - delta);
} else {
bounds.Height = Math.Max(0, bounds.Height + delta);
}
bounds.Height = Math.Max(0, bounds.Height + delta);
info.Bounds = bounds;
} else {
foreach (var item in operation.PlacedItems) {
@ -117,8 +119,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions @@ -117,8 +119,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
if (operation.Type == PlacementType.Resize) {
if (info.ResizeThumbAlignment.Horizontal == HorizontalAlignment.Left) {
bounds.X += delta;
}
bounds.Width = Math.Max(0, bounds.Width + delta);
bounds.Width = Math.Max(0, bounds.Width - delta);
} else {
bounds.Width = Math.Max(0, bounds.Width + delta);
}
info.Bounds = bounds;
} else {
foreach (var item in operation.PlacedItems) {

9
src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGrid.cs

@ -7,6 +7,7 @@ using System.Collections.ObjectModel; @@ -7,6 +7,7 @@ using System.Collections.ObjectModel;
using System.Threading;
using System.Globalization;
using ICSharpCode.WpfDesign.PropertyGrid;
using System.Windows.Threading;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid
{
@ -89,9 +90,11 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid @@ -89,9 +90,11 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid
return selectedItems;
}
set {
selectedItems = value;
Reload();
RaisePropertyChanged("SelectedItems");
Dispatcher.CurrentDispatcher.BeginInvoke(new Action(delegate {
selectedItems = value;
Reload();
RaisePropertyChanged("SelectedItems");
}), DispatcherPriority.Background);
}
}

Loading…
Cancel
Save