aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml1
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml30
3 files changed, 30 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
index 9b865c18b..3af921f7d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogRenderer.cs
@@ -52,7 +52,7 @@ namespace Tango.PPC.Common.Controls
private double groupMargin = 50;
private bool selectedFromClick;
private LightTouchScrollViewer _scrollViewer;
- private BitmapSource _myColorBitmap;
+ // private BitmapSource _myColorBitmap;
private double imageWidth = 24;
private double imageHeight = 22;
private Point _lastMouseClickPoint;
@@ -100,7 +100,7 @@ namespace Tango.PPC.Common.Controls
this.PreviewMouseUp += TwineCatalogRenderer_MouseLeftButtonUp;
this.Loaded += TwineCatalogRenderer_Loaded;
- _myColorBitmap = new BitmapImage(new Uri($"pack://application:,,,/Tango.PPC.JobsV2;component/Images/ColorSelection/Heart.png", UriKind.Absolute));
+ // _myColorBitmap = new BitmapImage(new Uri($"pack://application:,,,/Tango.PPC.JobsV2;component/Images/ColorSelection/Heart.png", UriKind.Absolute));
}
private void TwineCatalogRenderer_Loaded(object sender, RoutedEventArgs e)
@@ -292,7 +292,7 @@ namespace Tango.PPC.Common.Controls
DrawingVisual drawingVisual = new DrawingVisual();
DrawingContext drawingContext = drawingVisual.RenderOpen();
- drawingContext.DrawImage(_myColorBitmap, imageRect);
+ // drawingContext.DrawImage(_myColorBitmap, imageRect);
drawingContext.DrawEllipse(new SolidColorBrush(item.Color), null, new Point(x + ellipseWidth / 2, y + ellipseHeight / 2), ellipseWidth / 2, ellipseHeight / 2);
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
index bb0a694cf..780941f66 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml
@@ -19,6 +19,7 @@
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchCheckBox.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchExpander.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchNumericUpDownControl.xaml" />
+ <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchScrollViewer.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchExpander.xaml" />
<ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchNativeListBox.xaml" />
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
index bb1890e7f..432f2b58b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Styles.xaml
@@ -58,10 +58,32 @@
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
- <touch:TouchScrollViewer CanContentScroll="True"
- Padding="{TemplateBinding Padding}"
- Focusable="False"
- HorizontalScrollBarVisibility="Hidden">
+ <touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False" HorizontalScrollBarVisibility="Hidden">
+ <ItemsPresenter />
+ </touch:TouchScrollViewer>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+ <Style TargetType="{x:Type ListBox}" x:Key="ListBoxVerticalScroll" BasedOn="{StaticResource BlankListBox}">
+ <Setter Property="BorderThickness" Value="0"></Setter>
+ <Setter Property="VirtualizingPanel.ScrollUnit" Value="Pixel"></Setter>
+ <Setter Property="ItemsPanel">
+ <Setter.Value>
+ <ItemsPanelTemplate>
+ <VirtualizingStackPanel IsVirtualizing="True" VirtualizationMode="Recycling" VirtualizingPanel.ScrollUnit="Pixel" />
+ </ItemsPanelTemplate>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ListBox}">
+ <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
+ <touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False"
+
+ Style="{StaticResource TouchVerticalScrollViewer}">
<ItemsPresenter />
</touch:TouchScrollViewer>
</Border>