|
5 | 5 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
7 | 7 | xmlns:bindablechannel="using:Quarrel.Bindables.Channels.Abstract" |
| 8 | + xmlns:convert="using:Quarrel.Converters.Common.Visible" |
8 | 9 | xmlns:bindablechannels="using:Quarrel.Bindables.Channels" |
9 | 10 | xmlns:cselectors="using:Quarrel.Selectors.Channels" |
10 | 11 | xmlns:wuxdata="using:Windows.UI.Xaml.Data" |
|
49 | 50 | <GroupStyle HidesIfEmpty="False"> |
50 | 51 | <GroupStyle.HeaderTemplate> |
51 | 52 | <DataTemplate x:DataType="bindablechannels:BindableChannelGroup"> |
52 | | - <ContentControl Content="{x:Bind Key}" |
53 | | - ContentTemplate="{StaticResource CategoryZoomInChannelTemplate}"/> |
| 53 | + <StackPanel Visibility="{x:Bind convert:VisibleWhenNotNullConverter.Convert(Key)}"> |
| 54 | + <ContentControl Content="{x:Bind Key}" |
| 55 | + ContentTemplate="{StaticResource CategoryZoomInChannelTemplate}"/> |
| 56 | + <Rectangle Stroke="{ThemeResource SystemControlForegroundBaseLowBrush}" |
| 57 | + StrokeThickness="0.5" |
| 58 | + Height="1" |
| 59 | + VerticalAlignment="Bottom" |
| 60 | + HorizontalAlignment="Stretch" |
| 61 | + Margin="12,8,12,0"/> |
| 62 | + </StackPanel> |
54 | 63 | </DataTemplate> |
55 | 64 | </GroupStyle.HeaderTemplate> |
| 65 | + <GroupStyle.HeaderContainerStyle> |
| 66 | + <Style TargetType="ListViewHeaderItem"> |
| 67 | + <Setter Property="MinHeight" Value="0"/> |
| 68 | + <Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
| 69 | + <Setter Property="Template"> |
| 70 | + <Setter.Value> |
| 71 | + <ControlTemplate TargetType="ListViewHeaderItem"> |
| 72 | + <ContentPresenter x:Name="ContentPresenter" |
| 73 | + Margin="{TemplateBinding Padding}" |
| 74 | + Content="{TemplateBinding Content}" |
| 75 | + ContentTemplate="{TemplateBinding ContentTemplate}" |
| 76 | + ContentTransitions="{TemplateBinding ContentTransitions}" |
| 77 | + HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 78 | + VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/> |
| 79 | + </ControlTemplate> |
| 80 | + </Setter.Value> |
| 81 | + </Setter> |
| 82 | + </Style> |
| 83 | + </GroupStyle.HeaderContainerStyle> |
56 | 84 | </GroupStyle> |
57 | 85 | </ListView.GroupStyle> |
| 86 | + <ListView.ItemsPanel> |
| 87 | + <ItemsPanelTemplate> |
| 88 | + <ItemsStackPanel AreStickyGroupHeadersEnabled="False"/> |
| 89 | + </ItemsPanelTemplate> |
| 90 | + </ListView.ItemsPanel> |
58 | 91 | <ListView.Footer> |
59 | 92 | <Grid Height="{x:Bind BottomMargin, Mode=OneWay}"/> |
60 | 93 | </ListView.Footer> |
|
0 commit comments