aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-10 11:38:50 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-10 11:38:50 +0300
commitafd359b383a09f720d512dbf1f3bb6707dc4b83e (patch)
tree950435d3dd35a268f44576330a2c9b0996ae97c2 /Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml
parent17edf0cd108fb4a27dade328eaa294d352909b8f (diff)
downloadTango-afd359b383a09f720d512dbf1f3bb6707dc4b83e.tar.gz
Tango-afd359b383a09f720d512dbf1f3bb6707dc4b83e.zip
Implemented job type picker dialog.
Implemented "native" touch listbox.
Diffstat (limited to 'Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml')
-rw-r--r--Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml57
1 files changed, 57 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml
new file mode 100644
index 000000000..7d04c902a
--- /dev/null
+++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNativeListBox.xaml
@@ -0,0 +1,57 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:components="clr-namespace:Tango.Touch.Components"
+ xmlns:local="clr-namespace:Tango.Touch.Controls">
+
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="../Resources/Colors.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+
+ <Style TargetType="{x:Type local:TouchNativeListBox}">
+ <Setter Property="ItemContainerStyle">
+ <Setter.Value>
+ <Style TargetType="ListBoxItem">
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="ListBoxItem">
+ <components:Ripple RippleBrush="{StaticResource TangoRippleDarkBrush}" RippleFactor="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNativeListBox},Path=RippleFactor}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch">
+ <components:Ripple.Style>
+ <Style TargetType="components:Ripple">
+ <Setter Property="Disabled" Value="False"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=local:LightTouchScrollViewer},Path=IsScrolling}" Value="True">
+ <Setter Property="Disabled" Value="True"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </components:Ripple.Style>
+ <Border Background="{TemplateBinding Background}">
+ <ContentControl Content="{Binding}" ContentTemplate="{Binding RelativeSource={RelativeSource AncestorType=local:TouchNativeListBox},Path=ItemTemplate}" />
+ </Border>
+ </components:Ripple>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+ </Setter.Value>
+ </Setter>
+ <Setter Property="Background" Value="Transparent"/>
+ <Setter Property="BorderThickness" Value="0"/>
+ <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type local:TouchNativeListBox}">
+ <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="1" SnapsToDevicePixels="true">
+ <local:LightTouchScrollViewer x:Name="PART_ScrollViewer">
+ <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
+ </local:LightTouchScrollViewer>
+ </Border>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+
+</ResourceDictionary> \ No newline at end of file