diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-27 19:33:15 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-27 19:33:15 +0300 |
| commit | e571f20e27c4fca6bb6efe03d6427a1f332f9830 (patch) | |
| tree | b16041b76ea3b4e8368039c9396f9bbf9624dcc2 /Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs | |
| parent | 157e0685abb2e7b22b6584cdc7d6f5838ed0a808 (diff) | |
| download | Tango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.tar.gz Tango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.zip | |
Working on panel pc.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs index 504b97d9c..bc1a63124 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs @@ -52,17 +52,17 @@ namespace Tango.Touch.Controls { var container = ItemContainerGenerator.ContainerFromItem(SelectedItem) as FrameworkElement; - ContentPresenter presenter = UIHelper.FindChild<ContentPresenter>(container); + ContentPresenter presenter = UIHelper.FindChild<ContentPresenter>(container).FindChild<ContentPresenter>(); if (presenter != null) { Point relativePoint = presenter.TransformToAncestor(this).Transform(new Point(0, 0)); - Size size = presenter.RenderSize; + double width = presenter.ActualWidth; if (_lastSelectedItem != null && Items.IndexOf(SelectedItem) > Items.IndexOf(_lastSelectedItem)) { DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + size.Width; + aniX2.To = relativePoint.X + width; aniX2.Duration = TimeSpan.FromSeconds(0.2); _line.BeginAnimation(Line.X2Property, aniX2); @@ -80,7 +80,7 @@ namespace Tango.Touch.Controls _line.BeginAnimation(Line.X1Property, aniX1); DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + size.Width; + aniX2.To = relativePoint.X + width; aniX2.BeginTime = TimeSpan.FromSeconds(0.2); aniX2.Duration = TimeSpan.FromSeconds(0.1); _line.BeginAnimation(Line.X2Property, aniX2); |
