|
33 | 33 | </Grid.ColumnDefinitions> |
34 | 34 |
|
35 | 35 | <Grid.RowDefinitions> |
| 36 | + <RowDefinition Height="Auto" /> |
| 37 | + <RowDefinition Height="Auto" MaxHeight="450" /> |
36 | 38 | <RowDefinition Height="Auto" /> |
37 | 39 | <RowDefinition Height="Auto" MaxHeight="450" /> |
38 | 40 | <RowDefinition Height="Auto" /> |
|
203 | 205 | </Grid> |
204 | 206 | </smtx:XamlDisplay> |
205 | 207 |
|
206 | | - <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="Multi-Select Tree View:" |
207 | | - Grid.Column="2"/> |
208 | | - <smtx:XamlDisplay Grid.Row="1" |
209 | | - Grid.Column="2" |
210 | | - VerticalContentAlignment="Top" |
211 | | - UniqueKey="trees_3"> |
| 208 | + <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="Multi-Select Tree List View:" |
| 209 | + Grid.Row="2" |
| 210 | + Grid.Column="0" |
| 211 | + Margin="0,40,0,0"/> |
| 212 | + <smtx:XamlDisplay Grid.Row="3" |
| 213 | + Grid.Column="0" |
| 214 | + VerticalContentAlignment="Top" |
| 215 | + UniqueKey="trees_3" |
| 216 | + Margin="0,75,0,20"> |
212 | 217 | <Grid> |
213 | 218 | <materialDesign:TreeListView MinWidth="220" MaxHeight="450" |
214 | 219 | ItemsSource="{Binding TreeItems}" |
|
244 | 249 | </Style> |
245 | 250 | </materialDesign:TreeListView.ItemContainerStyle> |
246 | 251 |
|
247 | | - <!--<materialDesign:TreeListView.View> |
| 252 | + </materialDesign:TreeListView> |
| 253 | + <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right"> |
| 254 | + <Button Command="{Binding AddListTreeItemCommand}" |
| 255 | + ToolTip="Add an item" |
| 256 | + Content="{materialDesign:PackIcon Kind=Add}"/> |
| 257 | + |
| 258 | + <Button Command="{Binding RemoveListTreeItemCommand}" |
| 259 | + ToolTip="Remove selected item(s)" |
| 260 | + Content="{materialDesign:PackIcon Kind=Remove}"/> |
| 261 | + |
| 262 | + </StackPanel> |
| 263 | + </Grid> |
| 264 | + </smtx:XamlDisplay> |
| 265 | + |
| 266 | + <TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" |
| 267 | + Text="Multi-Select Tree Grid View:" |
| 268 | + Grid.Row="2" |
| 269 | + Grid.Column="1" |
| 270 | + Margin="0,40,0,0" /> |
| 271 | + <smtx:XamlDisplay Grid.Row="3" |
| 272 | + Grid.Column="1" |
| 273 | + VerticalContentAlignment="Top" |
| 274 | + UniqueKey="trees_7" |
| 275 | + Margin="0,20,0,20"> |
| 276 | + <Grid> |
| 277 | + <materialDesign:TreeListView MinWidth="220" |
| 278 | + MaxHeight="450" |
| 279 | + ItemsSource="{Binding TreeItems}" |
| 280 | + SelectedItem="{Binding SelectedTreeItem}"> |
| 281 | + <materialDesign:TreeListView.Resources> |
| 282 | + <HierarchicalDataTemplate DataType="{x:Type domain:TestItem}" |
| 283 | + ItemsSource="{Binding Items, Mode=OneTime}"> |
| 284 | + <TextBlock VerticalAlignment="Center" |
| 285 | + Text="{Binding Name, Mode=OneTime}" /> |
| 286 | + </HierarchicalDataTemplate> |
| 287 | + |
| 288 | + <HierarchicalDataTemplate DataType="{x:Type domain:MovieCategory}" |
| 289 | + ItemsSource="{Binding Movies, Mode=OneTime}"> |
| 290 | + <TextBlock Margin="3,2" |
| 291 | + Text="{Binding Name, Mode=OneTime}" /> |
| 292 | + </HierarchicalDataTemplate> |
| 293 | + |
| 294 | + <DataTemplate DataType="{x:Type domain:Movie}"> |
| 295 | + <TextBlock Margin="3,2" |
| 296 | + Text="{Binding Name, Mode=OneTime}" |
| 297 | + ToolTip="{Binding Director, Mode=OneTime}" /> |
| 298 | + </DataTemplate> |
| 299 | + </materialDesign:TreeListView.Resources> |
| 300 | + |
| 301 | + <materialDesign:TreeListView.ItemContainerStyle> |
| 302 | + <Style TargetType="materialDesign:TreeListViewItem" |
| 303 | + BasedOn="{StaticResource {x:Type materialDesign:TreeListViewItem}}"> |
| 304 | + <Setter Property="IsExpanded" |
| 305 | + Value="{Binding IsExpanded}" /> |
| 306 | + </Style> |
| 307 | + </materialDesign:TreeListView.ItemContainerStyle> |
| 308 | + |
| 309 | + <materialDesign:TreeListView.View> |
248 | 310 | <GridView> |
249 | 311 | <GridView.Columns> |
250 | | - <GridViewColumn Width="250" Header="Name"> |
| 312 | + <GridViewColumn Width="250" |
| 313 | + Header="Name"> |
251 | 314 | <GridViewColumn.CellTemplate> |
252 | 315 | <DataTemplate> |
253 | | - <TextBlock VerticalAlignment="Center" Text="{Binding Name, Mode=OneTime}" /> |
| 316 | + <TextBlock VerticalAlignment="Center" |
| 317 | + Text="{Binding Name, Mode=OneTime}" /> |
254 | 318 | </DataTemplate> |
255 | 319 | </GridViewColumn.CellTemplate> |
256 | 320 | </GridViewColumn> |
257 | 321 |
|
258 | | - <GridViewColumn Width="100" Header="Count"> |
| 322 | + <GridViewColumn Width="100" |
| 323 | + Header="Count"> |
259 | 324 | <GridViewColumn.CellTemplate> |
260 | 325 | <DataTemplate> |
261 | | - <TextBlock VerticalAlignment="Center" Text="{Binding Items.Count, Mode=OneWay}" /> |
| 326 | + <TextBlock VerticalAlignment="Center" |
| 327 | + Text="{Binding Items.Count, Mode=OneWay}" /> |
262 | 328 | </DataTemplate> |
263 | 329 | </GridViewColumn.CellTemplate> |
264 | 330 | </GridViewColumn> |
265 | 331 | </GridView.Columns> |
266 | 332 | </GridView> |
267 | | - </materialDesign:TreeListView.View>--> |
| 333 | + </materialDesign:TreeListView.View> |
268 | 334 | </materialDesign:TreeListView> |
269 | | - <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Right"> |
| 335 | + <StackPanel Orientation="Horizontal" |
| 336 | + VerticalAlignment="Bottom" |
| 337 | + HorizontalAlignment="Right"> |
270 | 338 | <Button Command="{Binding AddListTreeItemCommand}" |
271 | 339 | ToolTip="Add an item" |
272 | | - Content="{materialDesign:PackIcon Kind=Add}"/> |
| 340 | + Content="{materialDesign:PackIcon Kind=Add}" /> |
273 | 341 |
|
274 | 342 | <Button Command="{Binding RemoveListTreeItemCommand}" |
275 | 343 | ToolTip="Remove selected item(s)" |
276 | | - Content="{materialDesign:PackIcon Kind=Remove}"/> |
| 344 | + Content="{materialDesign:PackIcon Kind=Remove}" /> |
277 | 345 |
|
278 | 346 | </StackPanel> |
279 | 347 | </Grid> |
280 | 348 | </smtx:XamlDisplay> |
281 | 349 |
|
282 | | - <TextBlock Grid.Row="2" |
| 350 | + <TextBlock Grid.Row="4" |
283 | 351 | Style="{StaticResource PageSectionTitleTextBlock}" |
284 | 352 | Text="Additional node content, syntax 1" /> |
285 | 353 |
|
286 | | - <smtx:XamlDisplay Grid.Row="3" |
| 354 | + <smtx:XamlDisplay Grid.Row="5" |
287 | 355 | UniqueKey="trees_4"> |
288 | 356 | <TreeView> |
289 | 357 | <materialDesign:TreeViewAssist.AdditionalTemplate> |
|
326 | 394 | </TreeView> |
327 | 395 | </smtx:XamlDisplay> |
328 | 396 |
|
329 | | - <TextBlock Grid.Row="2" |
| 397 | + <TextBlock Grid.Row="4" |
330 | 398 | Grid.Column="1" |
331 | 399 | Margin="32,0,0,0" |
332 | 400 | Style="{StaticResource PageSectionTitleTextBlock}" |
333 | 401 | Text="Additional node content, syntax 2" /> |
334 | 402 |
|
335 | | - <smtx:XamlDisplay Grid.Row="3" |
| 403 | + <smtx:XamlDisplay Grid.Row="5" |
336 | 404 | Grid.Column="1" |
337 | 405 | Margin="32,0,0,0" |
338 | 406 | UniqueKey="trees_5"> |
|
376 | 444 | </TreeView> |
377 | 445 | </smtx:XamlDisplay> |
378 | 446 |
|
379 | | - <TextBlock Grid.Row="2" |
| 447 | + <TextBlock Grid.Row="4" |
380 | 448 | Grid.Column="2" |
381 | 449 | Margin="32,0,0,0" |
382 | 450 | Style="{StaticResource PageSectionTitleTextBlock}" |
383 | 451 | Text="Additional node content, showcase" /> |
384 | 452 |
|
385 | | - <smtx:XamlDisplay Grid.Row="3" |
| 453 | + <smtx:XamlDisplay Grid.Row="5" |
386 | 454 | Grid.Column="2" |
387 | 455 | Margin="32,0,0,0" |
388 | 456 | UniqueKey="trees_6"> |
|
0 commit comments