|
12 | 12 | d:DesignWidth="400">
|
13 | 13 |
|
14 | 14 | <Control.Resources>
|
| 15 | + <Style x:Key="ConversationStyle" TargetType="ListView"> |
| 16 | + <Setter Property="IsTabStop" Value="False" /> |
| 17 | + <Setter Property="TabNavigation" Value="Once" /> |
| 18 | + <Setter Property="IsSwipeEnabled" Value="True" /> |
| 19 | + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> |
| 20 | + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/> |
| 21 | + <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" /> |
| 22 | + <Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="False" /> |
| 23 | + <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" /> |
| 24 | + <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True" /> |
| 25 | + <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" /> |
| 26 | + <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" /> |
| 27 | + <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True" /> |
| 28 | + <Setter Property="ItemContainerTransitions"> |
| 29 | + <Setter.Value> |
| 30 | + <TransitionCollection> |
| 31 | + <AddDeleteThemeTransition /> |
| 32 | + <ContentThemeTransition /> |
| 33 | + <ReorderThemeTransition /> |
| 34 | + <EntranceThemeTransition IsStaggeringEnabled="False" /> |
| 35 | + </TransitionCollection> |
| 36 | + </Setter.Value> |
| 37 | + </Setter> |
| 38 | + <Setter Property="ItemsPanel"> |
| 39 | + <Setter.Value> |
| 40 | + <ItemsPanelTemplate> |
| 41 | + <ItemsStackPanel Orientation="Vertical" /> |
| 42 | + </ItemsPanelTemplate> |
| 43 | + </Setter.Value> |
| 44 | + </Setter> |
| 45 | + <Setter Property="Template"> |
| 46 | + <Setter.Value> |
| 47 | + <ControlTemplate TargetType="ListView"> |
| 48 | + <Border BorderBrush="{TemplateBinding BorderBrush}" |
| 49 | + Background="{TemplateBinding Background}" |
| 50 | + BorderThickness="{TemplateBinding BorderThickness}"> |
| 51 | + <ScrollViewer x:Name="ScrollViewer" |
| 52 | + ViewChanged="ScrollViewer_ViewChanged" |
| 53 | + TabNavigation="{TemplateBinding TabNavigation}" |
| 54 | + HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}" |
| 55 | + HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" |
| 56 | + IsHorizontalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsHorizontalScrollChainingEnabled}" |
| 57 | + VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}" |
| 58 | + VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" |
| 59 | + IsVerticalScrollChainingEnabled="{TemplateBinding ScrollViewer.IsVerticalScrollChainingEnabled}" |
| 60 | + IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}" |
| 61 | + IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}" |
| 62 | + ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}" |
| 63 | + IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}" |
| 64 | + BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}" |
| 65 | + AutomationProperties.AccessibilityView="Raw"> |
| 66 | + <ItemsPresenter |
| 67 | + Header="{TemplateBinding Header}" |
| 68 | + HeaderTemplate="{TemplateBinding HeaderTemplate}" |
| 69 | + HeaderTransitions="{TemplateBinding HeaderTransitions}" |
| 70 | + Footer="{TemplateBinding Footer}" |
| 71 | + FooterTemplate="{TemplateBinding FooterTemplate}" |
| 72 | + FooterTransitions="{TemplateBinding FooterTransitions}" |
| 73 | + Padding="{TemplateBinding Padding}"/> |
| 74 | + </ScrollViewer> |
| 75 | + </Border> |
| 76 | + </ControlTemplate> |
| 77 | + </Setter.Value> |
| 78 | + </Setter> |
| 79 | + </Style> |
15 | 80 | <DataTemplate x:Key="NormalMessageTemplate" x:DataType="models:SignalMessage">
|
16 | 81 | <local:Message x:Name="ListBoxItemContent" />
|
17 | 82 | </DataTemplate>
|
|
54 | 119 | </Button>
|
55 | 120 | </Grid>
|
56 | 121 | </Border>
|
57 |
| - <ListView Grid.Row="1" Name="ConversationItemsControl" VirtualizingStackPanel.VirtualizationMode="Recycling" Background="White" ScrollViewer.VerticalScrollBarVisibility="Visible" Padding="0 0 15 0" ItemTemplateSelector="{StaticResource MessageDataTemplateSelector}" SelectionMode="None"> |
| 122 | + <ListView Style="{StaticResource ConversationStyle}" Grid.Row="1" Name="ConversationItemsControl" VirtualizingStackPanel.VirtualizationMode="Recycling" Background="White" ScrollViewer.VerticalScrollBarVisibility="Visible" Padding="0 0 15 0" ItemTemplateSelector="{StaticResource MessageDataTemplateSelector}" SelectionMode="None"> |
58 | 123 | <ListView.ItemContainerStyle>
|
59 | 124 | <Style TargetType="ListViewItem">
|
60 | 125 | <Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
0 commit comments