aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-03 12:03:55 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-03 12:03:55 +0300
commitc9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694 (patch)
tree3b92b537099625fd2d29a4e08378194c3c62f3c4 /Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
parent5ab2e8a2edf1ce487976da347a5e03d18ff307b1 (diff)
downloadTango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.tar.gz
Tango-c9d3c1a7408f6f7a4814c1a8f5cf58a2d13e1694.zip
Machine Studio.
Implemented upload hardware configuration from connected machine view. Implemented process parameters dragging through developer module settings :/
Diffstat (limited to 'Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs')
-rw-r--r--Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs44
1 files changed, 44 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
new file mode 100644
index 000000000..043613308
--- /dev/null
+++ b/Software/Visual_Studio/Tango.DragAndDrop/DragAndDropContainer.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Markup;
+
+namespace Tango.DragAndDrop
+{
+ [ContentProperty(nameof(InnerContent))]
+ public class DragAndDropContainer : ContentControl
+ {
+ public DragAndDropContainer()
+ {
+ Grid g = new Grid();
+ Content = g;
+
+ ContentControl control = new ContentControl();
+ control.Bind(ContentControl.ContentProperty, this, InnerContentProperty, System.Windows.Data.BindingMode.OneWay);
+ g.Children.Add(control);
+
+ DraggingSurface = new DraggingSurface();
+ g.Children.Add(DraggingSurface);
+ }
+
+ public DraggingSurface DraggingSurface
+ {
+ get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); }
+ private set { SetValue(DraggingSurfaceProperty, value); }
+ }
+ public static readonly DependencyProperty DraggingSurfaceProperty =
+ DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(DragAndDropContainer), new PropertyMetadata(null));
+
+ public Object InnerContent
+ {
+ get { return (Object)GetValue(InnerContentProperty); }
+ set { SetValue(InnerContentProperty, value); }
+ }
+ public static readonly DependencyProperty InnerContentProperty =
+ DependencyProperty.Register("InnerContent", typeof(Object), typeof(DragAndDropContainer), new PropertyMetadata(null));
+ }
+}