|
4 | 4 | xmlns:local="using:WinUI.TableView" |
5 | 5 | xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
6 | 6 | xmlns:not_win="http://uno.ui/not_win" |
| 7 | + xmlns:converters="using:WinUI.TableView.Converters" |
7 | 8 | mc:Ignorable="not_win"> |
8 | 9 |
|
9 | 10 | <ResourceDictionary.MergedDictionaries> |
10 | 11 | <ResourceDictionary Source="ms-appx:///WinUI.TableView/Themes/Resources.xaml" /> |
11 | 12 | </ResourceDictionary.MergedDictionaries> |
12 | 13 |
|
| 14 | + <converters:BoolToVisibilityConverter x:Key="BoolToVisibility" /> |
| 15 | + |
13 | 16 | <Style x:Key="DefaultTableViewColumnHeaderStyle" |
14 | 17 | TargetType="local:TableViewColumnHeader"> |
15 | 18 | <Setter Property="FontWeight" |
|
152 | 155 | <MenuFlyoutItem.Template> |
153 | 156 | <ControlTemplate TargetType="MenuFlyoutItem"> |
154 | 157 | <Grid Margin="8,4" |
155 | | - Width="220" |
| 158 | + Width="250" |
156 | 159 | Height="300"> |
157 | 160 | <Grid.RowDefinitions> |
158 | 161 | <RowDefinition Height="Auto" /> |
|
182 | 185 | Value="36" /> |
183 | 186 | <Setter Property="Height" |
184 | 187 | Value="36" /> |
| 188 | + <Setter Property="HorizontalAlignment" |
| 189 | + Value="Stretch" /> |
| 190 | + <Setter Property="HorizontalContentAlignment" |
| 191 | + Value="Stretch" /> |
185 | 192 | </Style> |
186 | 193 | </ListView.ItemContainerStyle> |
187 | 194 | <ListView.ItemTemplate> |
188 | 195 | <DataTemplate> |
189 | | - <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}"> |
190 | | - <TextBlock Text="{Binding Value}" |
191 | | - TextWrapping="NoWrap" /> |
| 196 | + <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}" |
| 197 | + HorizontalAlignment="Stretch" |
| 198 | + HorizontalContentAlignment="Stretch"> |
| 199 | + <Grid> |
| 200 | + <Grid.ColumnDefinitions> |
| 201 | + <ColumnDefinition Width="*" /> |
| 202 | + <ColumnDefinition Width="Auto" /> |
| 203 | + </Grid.ColumnDefinitions> |
| 204 | + |
| 205 | + <TextBlock Text="{Binding Value}" |
| 206 | + TextWrapping="NoWrap" /> |
| 207 | + |
| 208 | + <TextBlock Grid.Column="1" |
| 209 | + Visibility="{Binding DataContext.TableView.ShowFilterItemCounts, ElementName=FilterItemsList, Converter={StaticResource BoolToVisibility}}"> |
| 210 | + <Run Text="Count:" /> |
| 211 | + <Run Text="{Binding Count}" /> |
| 212 | + </TextBlock> |
| 213 | + </Grid> |
192 | 214 | </CheckBox> |
193 | 215 | </DataTemplate> |
194 | 216 | </ListView.ItemTemplate> |
|
0 commit comments