From a5de87ea9863c6e7053e09ed1c2eabf58285af48 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 20 Jun 2023 16:40:58 +0300 Subject: PPC. Added Real Time Graph --- .../Tango.Touch/Controls/TouchNavigationLinks.cs | 22 +++++++++++++---- .../Tango.Touch/Controls/TouchNavigationLinks.xaml | 5 ++-- .../Tango.Touch/Resources/Colors.xaml | 28 ++++++++++++++++++++++ 3 files changed, 49 insertions(+), 6 deletions(-) (limited to 'Software/Visual_Studio/Tango.Touch') diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs index 3a0d3de9e..5fb4496e0 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs @@ -24,7 +24,18 @@ namespace Tango.Touch.Controls private const string PART_Rectangle = "PART_Rectangle"; private Line _line; private Object _lastSelectedItem; + + public int LineThickness + { + get { return (int)GetValue(LineThicknessProperty); } + set { SetValue(LineThicknessProperty, value); } + } + + // Using a DependencyProperty as the backing store for LineThickness. This enables animation, styling, binding, etc... + public static readonly DependencyProperty LineThicknessProperty = + DependencyProperty.Register("LineThickness", typeof(int), typeof(TouchNavigationLinks), new PropertyMetadata(3)); + static TouchNavigationLinks() { DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchNavigationLinks), new FrameworkPropertyMetadata(typeof(TouchNavigationLinks))); @@ -48,12 +59,14 @@ namespace Tango.Touch.Controls private void MoveLineToSelectedItem() { - if (SelectedItem != null) + if (SelectedItem != null ) { + if(SelectedItem is UIElement && ((UIElement)SelectedItem).IsEnabled == false) + return; var container = ItemContainerGenerator.ContainerFromItem(SelectedItem) as FrameworkElement; - + ContentPresenter presenter = container.FindChild().FindChild(); - + if (presenter != null) { Point relativePoint = presenter.TransformToAncestor(this).Transform(new Point(0, 0)); @@ -87,8 +100,9 @@ namespace Tango.Touch.Controls _line.BeginAnimation(Line.X2Property, aniX2); } } + _lastSelectedItem = SelectedItem; } - + _lastSelectedItem = SelectedItem; } } diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml index 599dfdf7c..2b8b4ff03 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.xaml @@ -37,10 +37,11 @@ + - + @@ -77,7 +78,7 @@ - + diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml index 283e69b45..1dc2090aa 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml @@ -60,6 +60,17 @@ #55FFFFFF #000131 + #18FFFFFF + #B6FF6F6F + #BBFFB84B + #B958C13B + #BBFA9252 + + #7C98B3 + #202020 + #505050 + #303030 + @@ -128,4 +139,21 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.3.1