|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
3 | 4 | xmlns:local="using:WinUI.TableView" |
4 | 5 | xmlns:win="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
5 | | - xmlns:not_win="http://uno.ui/not_win"> |
| 6 | + xmlns:not_win="http://uno.ui/not_win" |
| 7 | + xmlns:converters="using:WinUI.TableView.Converters" |
| 8 | + mc:Ignorable="not_win"> |
6 | 9 |
|
7 | 10 | <ResourceDictionary.MergedDictionaries> |
8 | 11 | <ResourceDictionary Source="ms-appx:///WinUI.TableView/Themes/Resources.xaml" /> |
9 | 12 | </ResourceDictionary.MergedDictionaries> |
10 | 13 |
|
| 14 | + <converters:BoolToVisibilityConverter x:Key="BoolToVisibility" /> |
| 15 | + |
11 | 16 | <Style x:Key="DefaultTableViewColumnHeaderStyle" |
12 | 17 | TargetType="local:TableViewColumnHeader"> |
13 | 18 | <Setter Property="FontWeight" |
|
150 | 155 | <MenuFlyoutItem.Template> |
151 | 156 | <ControlTemplate TargetType="MenuFlyoutItem"> |
152 | 157 | <Grid Margin="8,4" |
153 | | - Width="220" |
| 158 | + Width="250" |
154 | 159 | Height="300"> |
155 | 160 | <Grid.RowDefinitions> |
156 | 161 | <RowDefinition Height="Auto" /> |
|
167 | 172 | <ListView x:Name="FilterItemsList" |
168 | 173 | Grid.Row="2" |
169 | 174 | SelectionMode="None" |
| 175 | + not_win:Margin="12,0,0,0" |
170 | 176 | ItemsSource="{Binding FilterItems}"> |
171 | 177 | <ListView.ItemContainerStyle> |
172 | 178 | <Style TargetType="ListViewItem" |
|
179 | 185 | Value="36" /> |
180 | 186 | <Setter Property="Height" |
181 | 187 | Value="36" /> |
| 188 | + <Setter Property="HorizontalAlignment" |
| 189 | + Value="Stretch" /> |
| 190 | + <Setter Property="HorizontalContentAlignment" |
| 191 | + Value="Stretch" /> |
182 | 192 | </Style> |
183 | 193 | </ListView.ItemContainerStyle> |
184 | 194 | <ListView.ItemTemplate> |
185 | 195 | <DataTemplate> |
186 | | - <CheckBox IsChecked="{Binding IsSelected, Mode=TwoWay}"> |
187 | | - <TextBlock Text="{Binding Value}" |
188 | | - 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 | + <StackPanel Grid.Column="1" |
| 209 | + Orientation="Horizontal" |
| 210 | + Visibility="{Binding DataContext.TableView.ShowFilterItemsCount, ElementName=FilterItemsList, Converter={StaticResource BoolToVisibility}}"> |
| 211 | + <TextBlock Text="(" /> |
| 212 | + <TextBlock Text="{Binding Count}" /> |
| 213 | + <TextBlock Text=")" /> |
| 214 | + </StackPanel> |
| 215 | + </Grid> |
189 | 216 | </CheckBox> |
190 | 217 | </DataTemplate> |
191 | 218 | </ListView.ItemTemplate> |
|
0 commit comments