aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs
index 9574b4082..05fa0a651 100644
--- a/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs
+++ b/Software/Visual_Studio/TEMP/Tango.Graphics2D/Drawing2DHost.cs
@@ -120,7 +120,7 @@ namespace Tango.Graphics2D
private HitTestResultBehavior MouseDownCallback(HitTestResult result)
{
- if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual))
+ if (result.VisualHit.GetType() == typeof(DrawingVisual))
{
var visual = result.VisualHit as DrawingVisual;
@@ -139,7 +139,6 @@ namespace Tango.Graphics2D
}
}
- // Stop the hit test enumeration of objects in the visual tree.
return HitTestResultBehavior.Stop;
}
@@ -156,7 +155,7 @@ namespace Tango.Graphics2D
private HitTestResultBehavior MouseUpCallback(HitTestResult result)
{
- if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual))
+ if (result.VisualHit.GetType() == typeof(DrawingVisual))
{
var visual = result.VisualHit as DrawingVisual;
@@ -175,7 +174,6 @@ namespace Tango.Graphics2D
}
}
- // Stop the hit test enumeration of objects in the visual tree.
return HitTestResultBehavior.Stop;
}
@@ -189,7 +187,7 @@ namespace Tango.Graphics2D
private HitTestResultBehavior MouseMoveCallback(HitTestResult result)
{
- if (result.VisualHit.GetType() == typeof(System.Windows.Media.DrawingVisual))
+ if (result.VisualHit.GetType() == typeof(DrawingVisual))
{
var visual = result.VisualHit as DrawingVisual;
@@ -228,7 +226,6 @@ namespace Tango.Graphics2D
}
}
- // Stop the hit test enumeration of objects in the visual tree.
return HitTestResultBehavior.Stop;
}
@@ -291,9 +288,7 @@ namespace Tango.Graphics2D
{
var context = visual.RenderOpen();
- IVisualBinder binder = null;
-
- if (!_binders.TryGetValue(element.GetType(), out binder))
+ if (!_binders.TryGetValue(element.GetType(), out IVisualBinder binder))
{
throw new InvalidOperationException($"No visual binder is registered for element type '{element.GetType()}'");
}