blob: ccfbc6febc9587c56d37ba1da05a15e541636fdd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:localConverters="clr-namespace:Tango.Touch.Converters"
xmlns:local="clr-namespace:Tango.Touch.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Resources/Colors.xaml" />
</ResourceDictionary.MergedDictionaries>
<localConverters:SelectionModesToBooleanConverter x:Key="SelectionModesToBooleanConverter" />
<Style x:Key="TangoNoRippleListBox" TargetType="{x:Type local:TouchListBox}">
<Setter Property="local:TouchPanel.PreventFocusSteal" Value="True"></Setter>
<Setter Property="DisableScrolling" Value="True"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:TouchListBox}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
<local:LightTouchScrollViewer x:Name="PART_ScrollViewer" DisableScrolling="{TemplateBinding DisableScrolling}">
<ItemsControl VirtualizingPanel.IsVirtualizing="False" x:Name="PART_ItemsControl" Style="{x:Null}" ItemsSource="{TemplateBinding ItemsSource}" VerticalAlignment="Top" ClipToBounds="True">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel VirtualizingPanel.IsVirtualizing="False" Orientation="Vertical" VerticalAlignment="Top" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<local:TouchListBoxItem Style="{Binding RelativeSource={RelativeSource AncestorType=local:TouchListBox},Path=ItemContainerStyle}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Loaded">
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource AncestorType=local:TouchListBox},Path=ListBoxItemLoadedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=local:TouchListBoxItem}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ContentControl Content="{Binding}" ContentTemplate="{Binding RelativeSource={RelativeSource AncestorType=local:TouchListBox},Path=ItemTemplate}" />
</local:TouchListBoxItem>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</local:LightTouchScrollViewer>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>
|