aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-05-23 16:44:30 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-05-23 16:44:30 +0300
commit26cee052a5b20d7a5bdb597776c55dcd3da2da62 (patch)
treefd4a4bfceeb4509515913557fc66ad28704abdf9 /Software/Visual_Studio/Tango.Touch/Controls
parent2521b3c058fe18f1ebd48a85577349b49c1c2108 (diff)
downloadTango-26cee052a5b20d7a5bdb597776c55dcd3da2da62.tar.gz
Tango-26cee052a5b20d7a5bdb597776c55dcd3da2da62.zip
Implemented new Twine color catalog !
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.xaml3
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs14
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.xaml3
3 files changed, 13 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.xaml b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.xaml
index 7e5b986e9..515b4c06f 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchDataGrid.xaml
@@ -216,6 +216,9 @@
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<Canvas ClipToBounds="True" IsItemsHost="True" VirtualizingPanel.IsVirtualizing="True">
+ <Canvas.CacheMode>
+ <BitmapCache EnableClearType="False" SnapsToDevicePixels="False" RenderAtScale="1" />
+ </Canvas.CacheMode>
</Canvas>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
index d12be0e4c..76486d929 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.cs
@@ -27,7 +27,7 @@ namespace Tango.Touch.Controls
private const double bounce_offset_max = 50;
private Thumb _thumb;
private Border _border_thumb;
- private TouchDevice _moveTouchDevice;
+ private StylusDevice _moveTouchDevice;
private FrameworkElement _down_element;
private bool _is_dragging_off_view;
private DispatcherTimer _dragging_timer;
@@ -230,7 +230,7 @@ namespace Tango.Touch.Controls
ContentPresenter presenter = GetTemplateChild("PART_Content_Presenter") as ContentPresenter;
_border_viewport.RegisterForMouseOrTouchDown(OnMouseTouchDown);
- _border_viewport.RegisterForMouseOrTouchMove(OnMouseTouchMove);
+ _border_viewport.RegisterForMouseOrStylusMove(OnMouseTouchMove);
_border_viewport.RegisterForPreviewMouseOrTouchUp(OnMouseTouchUp);
//_border_viewport.ManipulationDelta += _grid_rows_ManipulationDelta;
@@ -505,10 +505,10 @@ namespace Tango.Touch.Controls
IsScrolling = true;
Mouse.Capture(_border_viewport);
- if (e.TouchDevice != null)
+ if (e.StylusDevice != null)
{
- _moveTouchDevice = e.TouchDevice;
- e.TouchDevice.Capture(_border_viewport);
+ _moveTouchDevice = e.StylusDevice;
+ e.StylusDevice.Capture(_border_viewport);
}
}
@@ -671,12 +671,12 @@ namespace Tango.Touch.Controls
if (_moveTouchDevice != null)
{
- _border_viewport.ReleaseTouchCapture(_moveTouchDevice);
+ _border_viewport.ReleaseStylusCapture();
_moveTouchDevice = null;
}
}
- private Rect GetViewPortRect()
+ public Rect GetViewPortRect()
{
return new Rect(0, -_grid_content.Margin.Top, _border_viewport.ActualWidth, _border_viewport.ActualHeight);
}
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.xaml b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.xaml
index 51738c299..7cc38666e 100644
--- a/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.xaml
+++ b/Software/Visual_Studio/Tango.Touch/Controls/LightTouchScrollViewer.xaml
@@ -25,6 +25,9 @@
<Border x:Name="PART_Border" ClipToBounds="True" Background="Transparent">
<Grid x:Name="PART_Grid_Content" Background="Transparent" VerticalAlignment="Top" Height="{Binding ElementName=stack,Path=ActualHeight,Mode=OneWay}">
<StackPanel x:Name="stack" VerticalAlignment="Top">
+ <StackPanel.CacheMode>
+ <BitmapCache SnapsToDevicePixels="False" RenderAtScale="1" EnableClearType="False" />
+ </StackPanel.CacheMode>
<ContentPresenter x:Name="PART_Content_Presenter" Content="{TemplateBinding Content}" VerticalAlignment="Top" Height="Auto" />
</StackPanel>
</Grid>