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. 8
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SnaplinePlacementBehavior.cs
  2. 9
      src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/PropertyGrid/PropertyGrid.cs

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

@ -96,8 +96,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
if (operation.Type == PlacementType.Resize) { if (operation.Type == PlacementType.Resize) {
if (info.ResizeThumbAlignment.Vertical == VerticalAlignment.Top) { if (info.ResizeThumbAlignment.Vertical == VerticalAlignment.Top) {
bounds.Y += delta; 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; info.Bounds = bounds;
} else { } else {
foreach (var item in operation.PlacedItems) { foreach (var item in operation.PlacedItems) {
@ -117,8 +119,10 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
if (operation.Type == PlacementType.Resize) { if (operation.Type == PlacementType.Resize) {
if (info.ResizeThumbAlignment.Horizontal == HorizontalAlignment.Left) { if (info.ResizeThumbAlignment.Horizontal == HorizontalAlignment.Left) {
bounds.X += delta; bounds.X += delta;
bounds.Width = Math.Max(0, bounds.Width - delta);
} else {
bounds.Width = Math.Max(0, bounds.Width + delta);
} }
bounds.Width = Math.Max(0, bounds.Width + delta);
info.Bounds = bounds; info.Bounds = bounds;
} else { } else {
foreach (var item in operation.PlacedItems) { 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;
using System.Threading; using System.Threading;
using System.Globalization; using System.Globalization;
using ICSharpCode.WpfDesign.PropertyGrid; using ICSharpCode.WpfDesign.PropertyGrid;
using System.Windows.Threading;
namespace ICSharpCode.WpfDesign.Designer.PropertyGrid namespace ICSharpCode.WpfDesign.Designer.PropertyGrid
{ {
@ -89,9 +90,11 @@ namespace ICSharpCode.WpfDesign.Designer.PropertyGrid
return selectedItems; return selectedItems;
} }
set { set {
selectedItems = value; Dispatcher.CurrentDispatcher.BeginInvoke(new Action(delegate {
Reload(); selectedItems = value;
RaisePropertyChanged("SelectedItems"); Reload();
RaisePropertyChanged("SelectedItems");
}), DispatcherPriority.Background);
} }
} }

Loading…
Cancel
Save