Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit d690ae5

Browse files
author
tbulle
committed
Revert "Merge remote-tracking branch 'remotes/origin/master' into WpfDesignerPartialPanelSelectionHandler"
This reverts commit 352d2dc, reversing changes made to aa59343.
1 parent 352d2dc commit d690ae5

39 files changed

+384
-1150
lines changed
-17.9 KB
Binary file not shown.
-177 KB
Binary file not shown.

src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
<Reference Include="System.Core" />
5555
<Reference Include="System.Design" />
5656
<Reference Include="System.Drawing" />
57-
<Reference Include="System.Drawing" />
5857
<Reference Include="System.Drawing.Design" />
5958
<Reference Include="System.Windows.Forms" />
6059
<Reference Include="System.Xaml">

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/ResizeThumb.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static readonly DependencyProperty IsPrimarySelectionProperty
4545
public static readonly DependencyProperty ResizeThumbVisibleProperty
4646
= DependencyProperty.Register("ResizeThumbVisible", typeof(bool), typeof(ResizeThumb), new FrameworkPropertyMetadata(true));
4747

48-
public PlacementAlignment Alignment;
48+
internal PlacementAlignment Alignment;
4949

5050
static ResizeThumb()
5151
{

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Controls/SizeDisplay.cs

+20-20
Original file line numberDiff line numberDiff line change
@@ -26,25 +26,25 @@
2626

2727
namespace ICSharpCode.WpfDesign.Designer.Controls
2828
{
29-
/// <summary>
30-
/// Display height of the element.
31-
/// </summary>
32-
public class HeightDisplay : Control
33-
{
34-
static HeightDisplay()
35-
{
36-
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay)));
37-
}
38-
}
29+
/// <summary>
30+
/// Display height of the element.
31+
/// </summary>
32+
class HeightDisplay : Control
33+
{
34+
static HeightDisplay()
35+
{
36+
DefaultStyleKeyProperty.OverrideMetadata(typeof(HeightDisplay), new FrameworkPropertyMetadata(typeof(HeightDisplay)));
37+
}
38+
}
3939

40-
/// <summary>
41-
/// Display width of the element.
42-
/// </summary>
43-
public class WidthDisplay : Control
44-
{
45-
static WidthDisplay()
46-
{
47-
DefaultStyleKeyProperty.OverrideMetadata(typeof(WidthDisplay), new FrameworkPropertyMetadata(typeof(WidthDisplay)));
48-
}
49-
}
40+
/// <summary>
41+
/// Display width of the element.
42+
/// </summary>
43+
class WidthDisplay : Control
44+
{
45+
static WidthDisplay()
46+
{
47+
DefaultStyleKeyProperty.OverrideMetadata(typeof(WidthDisplay), new FrameworkPropertyMetadata(typeof(WidthDisplay)));
48+
}
49+
}
5050
}

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/DesignPanel.cs

+7-12
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,14 @@ void RunHitTest(Visual reference, Point point, HitTestFilterCallback filterCallb
6464
HitTestFilterBehavior FilterHitTestInvisibleElements(DependencyObject potentialHitTestTarget)
6565
{
6666
UIElement element = potentialHitTestTarget as UIElement;
67-
67+
6868
if (element != null) {
6969
if (!(element.IsHitTestVisible && element.Visibility == Visibility.Visible)) {
7070
return HitTestFilterBehavior.ContinueSkipSelfAndChildren;
7171
}
7272

7373
var designItem = Context.Services.Component.GetDesignItem(element) as XamlDesignItem;
74-
74+
7575
if (designItem != null && designItem.IsDesignTimeLocked) {
7676
return HitTestFilterBehavior.ContinueSkipSelfAndChildren;
7777
}
@@ -109,17 +109,14 @@ public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurfa
109109
return;
110110
}
111111
// First try hit-testing on the adorner layer.
112-
112+
113113
bool continueHitTest = true;
114-
115-
HitTestFilterCallback filterBehavior = CustomHitTestFilterBehavior ?? FilterHitTestInvisibleElements;
116-
CustomHitTestFilterBehavior = null;
114+
117115
hitTestElements.Clear();
118116

119117
if (testAdorners) {
120-
121118
RunHitTest(
122-
_adornerLayer, mousePosition, filterBehavior,
119+
_adornerLayer, mousePosition, FilterHitTestInvisibleElements,
123120
delegate(HitTestResult result) {
124121
if (result != null && result.VisualHit != null && result.VisualHit is Visual) {
125122
DesignPanelHitTestResult customResult = new DesignPanelHitTestResult((Visual)result.VisualHit);
@@ -141,11 +138,11 @@ public void HitTest(Point mousePosition, bool testAdorners, bool testDesignSurfa
141138

142139
if (continueHitTest && testDesignSurface) {
143140
RunHitTest(
144-
this.Child, mousePosition, filterBehavior,
141+
this.Child, mousePosition, FilterHitTestInvisibleElements,
145142
delegate(HitTestResult result) {
146143
if (result != null && result.VisualHit != null && result.VisualHit is Visual) {
147144
DesignPanelHitTestResult customResult = new DesignPanelHitTestResult((Visual)result.VisualHit);
148-
145+
149146
ViewService viewService = _context.Services.View;
150147
DependencyObject obj = result.VisualHit;
151148

@@ -213,8 +210,6 @@ public DesignPanel()
213210

214211
#region Properties
215212

216-
//Set custom HitTestFilterCallbak
217-
public HitTestFilterCallback CustomHitTestFilterBehavior { get; set; }
218213
/// <summary>
219214
/// Gets/Sets the design context.
220215
/// </summary>

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/ExtensionMethods.cs

-13
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,6 @@ namespace ICSharpCode.WpfDesign.Designer
3131
{
3232
public static class ExtensionMethods
3333
{
34-
35-
public static bool AnyIsInNamespace(this Type type, string namespacestr)
36-
{
37-
Type t = type;
38-
while (t!=null)
39-
{
40-
if (t.Namespace.Equals(namespacestr))
41-
return true;
42-
t = t.BaseType;
43-
}
44-
return false;
45-
}
46-
4734
public static double Coerce(this double value, double min, double max)
4835
{
4936
return Math.Max(Math.Min(value, max), min);

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/QuickOperationMenuExtension.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
3333
/// </summary>
3434
[ExtensionServer(typeof(OnlyOneItemSelectedExtensionServer))]
3535
[ExtensionFor(typeof (FrameworkElement))]
36-
public class QuickOperationMenuExtension : PrimarySelectionAdornerProvider
36+
class QuickOperationMenuExtension : PrimarySelectionAdornerProvider
3737
{
3838
private QuickOperationMenu _menu;
3939
private KeyBinding _keyBinding;

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/Extensions/SizeDisplayExtension.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ namespace ICSharpCode.WpfDesign.Designer.Extensions
3333
/// Display Height/Width on the primary selection
3434
/// </summary>
3535
[ExtensionFor(typeof(UIElement))]
36-
public class SizeDisplayExtension : PrimarySelectionAdornerProvider
36+
class SizeDisplayExtension : PrimarySelectionAdornerProvider
3737
{
3838
HeightDisplay _heightDisplay;
3939
WidthDisplay _widthDisplay;

src/AddIns/DisplayBindings/WpfDesign/WpfDesign.Designer/Project/OutlineView/Outline.xaml.cs

+3-4
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ public Outline()
4040
}
4141

4242
public static readonly DependencyProperty RootProperty =
43-
DependencyProperty.Register("Root", typeof(IOutlineNode), typeof(Outline));
43+
DependencyProperty.Register("Root", typeof(OutlineNode), typeof(Outline));
4444

45-
public IOutlineNode Root
46-
{
47-
get { return (IOutlineNode)GetValue(RootProperty); }
45+
public OutlineNode Root {
46+
get { return (OutlineNode)GetValue(RootProperty); }
4847
set { SetValue(RootProperty, value); }
4948
}
5049

0 commit comments

Comments
 (0)