forked from microsoft/microsoft-ui-xaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTreeViewTestPage.xaml
30 lines (28 loc) · 1.28 KB
/
TreeViewTestPage.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<Page
x:Class="TestAppCX.TreeViewTestPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:TestAppCX"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">
<StackPanel Padding="20">
<controls:TreeView
x:Name="TestTreeView"
HorizontalAlignment="Left"
Width="400" Height="400"
ItemsSource="{x:Bind Items}">
<controls:TreeView.ItemTemplate>
<DataTemplate x:DataType="local:TreeViewData">
<controls:TreeViewItem
ItemsSource="{x:Bind Children}"
Content="{x:Bind Content}" />
</DataTemplate>
</controls:TreeView.ItemTemplate>
</controls:TreeView>
<Button Content="ReplaceAll" Click="ReplaceAll_Click" />
<Button Content="Clear" Click="Clear_Click" />
</StackPanel>
</Page>