aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.SharedUI/Controls
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2018-06-23 20:57:43 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2018-06-23 20:57:43 +0300
commit55c624cfa11e1c7998e5d3de0721aeee0814ce33 (patch)
treeadaad581c820aee174d559b6bae1075a78ea793b /Software/Visual_Studio/Tango.SharedUI/Controls
parent9488c1e116ffb61beb7bd581695605a75b2b7de9 (diff)
downloadTango-55c624cfa11e1c7998e5d3de0721aeee0814ce33.tar.gz
Tango-55c624cfa11e1c7998e5d3de0721aeee0814ce33.zip
Implemented TouchAutoComplete!
Refactored VSIX Tango Build Engine to use VS dialogs only. Added SQLite generation to VSIX. Implemented Job customer with auto complete on PPC job view.
Diffstat (limited to 'Software/Visual_Studio/Tango.SharedUI/Controls')
-rw-r--r--Software/Visual_Studio/Tango.SharedUI/Controls/AdornerContentPresenter.cs55
1 files changed, 55 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/AdornerContentPresenter.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/AdornerContentPresenter.cs
new file mode 100644
index 000000000..634f37311
--- /dev/null
+++ b/Software/Visual_Studio/Tango.SharedUI/Controls/AdornerContentPresenter.cs
@@ -0,0 +1,55 @@
+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.Documents;
+using System.Windows.Media;
+
+namespace Tango.SharedUI.Controls
+{
+ public class AdornerContentPresenter : Adorner
+ {
+ private VisualCollection _Visuals;
+ private ContentPresenter _ContentPresenter;
+
+ public AdornerContentPresenter(UIElement adornedElement)
+ : base(adornedElement)
+ {
+ _Visuals = new VisualCollection(this);
+ _ContentPresenter = new ContentPresenter();
+ _Visuals.Add(_ContentPresenter);
+ }
+
+ public AdornerContentPresenter(UIElement adornedElement, Visual content)
+ : this(adornedElement)
+ { Content = content; }
+
+ protected override Size MeasureOverride(Size constraint)
+ {
+ _ContentPresenter.Measure(constraint);
+ return _ContentPresenter.DesiredSize;
+ }
+
+ protected override Size ArrangeOverride(Size finalSize)
+ {
+ _ContentPresenter.Arrange(new Rect(0, 0,
+ finalSize.Width, finalSize.Height));
+ return _ContentPresenter.RenderSize;
+ }
+
+ protected override Visual GetVisualChild(int index)
+ { return _Visuals[index]; }
+
+ protected override int VisualChildrenCount
+ { get { return _Visuals.Count; } }
+
+ public object Content
+ {
+ get { return _ContentPresenter.Content; }
+ set { _ContentPresenter.Content = value; }
+ }
+ }
+}