-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #409 from Keboo/treeViewSMTX
Adding ShowMeTheXAML support to TreeView Page
- Loading branch information
Showing
1 changed file
with
122 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,130 +1,134 @@ | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
<UserControl xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" | ||
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia" | ||
xmlns:controls="clr-namespace:Material.Styles.Controls;assembly=Material.Styles" | ||
xmlns:showMeTheXaml="clr-namespace:ShowMeTheXaml;assembly=ShowMeTheXaml.Avalonia" | ||
x:Class="Material.Avalonia.Demo.Pages.TreeViewsDemo"> | ||
<StackPanel Margin="16, 0"> | ||
<StackPanel.Styles> | ||
<Style Selector="controls|Card.ChildDemo"> | ||
<Setter Property="Width" Value="320" /> | ||
<Setter Property="Height" Value="320" /> | ||
<Setter Property="Padding" Value="0" /> | ||
</Style> | ||
</StackPanel.Styles> | ||
<StackPanel Margin="16, 0"> | ||
<StackPanel.Styles> | ||
<Style Selector="controls|Card.ChildDemo"> | ||
<Setter Property="Width" Value="320" /> | ||
<Setter Property="Height" Value="320" /> | ||
<Setter Property="Padding" Value="0" /> | ||
</Style> | ||
</StackPanel.Styles> | ||
|
||
<!-- Content title --> | ||
<TextBlock Classes="Headline4 Subheadline" Text="TreeViews" /> | ||
<!-- Content title --> | ||
<TextBlock Classes="Headline4 Subheadline" Text="TreeViews" /> | ||
|
||
<WrapPanel> | ||
<!-- Demos --> | ||
<controls:Card Classes="ChildDemo"> | ||
<!-- TODO: StackPanel could ignore height of parent. --> | ||
<Grid RowDefinitions="Auto, *"> | ||
<TextBlock Classes="Headline6" Margin="8" Text="Operation systems: " /> | ||
|
||
<TreeView Grid.Row="1"> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="AppleFinder" /> | ||
<TextBlock Text="Apple MacOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="AppleIos" /> | ||
<TextBlock Text="Apple iOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="MicrosoftWindows" /> | ||
<TextBlock Text="Windows" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Linux" /> | ||
<TextBlock Text="Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Android" /> | ||
<TextBlock Text="Android" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<WrapPanel> | ||
<!-- Demos --> | ||
<showMeTheXaml:XamlDisplay UniqueId="TreeView0"> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Arch" /> | ||
<TextBlock Text="Arch Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Fedora" /> | ||
<TextBlock Text="Fedora" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Centos" /> | ||
<TextBlock Text="CentOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Debian" /> | ||
<TextBlock Text="Debian" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Ubuntu" /> | ||
<TextBlock Text="Ubuntu" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="LinuxMint" /> | ||
<TextBlock Text="Mint Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem Header="Pop!_OS"/> | ||
<TreeViewItem Header="Lubuntu"/> | ||
<TreeViewItem Header="Zorin OS"/> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
</TreeView> | ||
</Grid> | ||
</controls:Card> | ||
</WrapPanel> | ||
</StackPanel> | ||
<controls:Card Classes="ChildDemo"> | ||
<!-- TODO: StackPanel could ignore height of parent. --> | ||
<Grid RowDefinitions="Auto, *"> | ||
<TextBlock Classes="Headline6" Margin="8" Text="Operation systems: " /> | ||
|
||
<TreeView Grid.Row="1"> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="AppleFinder" /> | ||
<TextBlock Text="Apple MacOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="AppleIos" /> | ||
<TextBlock Text="Apple iOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="MicrosoftWindows" /> | ||
<TextBlock Text="Windows" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Linux" /> | ||
<TextBlock Text="Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Android" /> | ||
<TextBlock Text="Android" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Arch" /> | ||
<TextBlock Text="Arch Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Fedora" /> | ||
<TextBlock Text="Fedora" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Centos" /> | ||
<TextBlock Text="CentOS" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
|
||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Debian" /> | ||
<TextBlock Text="Debian" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="Ubuntu" /> | ||
<TextBlock Text="Ubuntu" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
<TreeViewItem> | ||
<TreeViewItem.Header> | ||
<Grid ColumnDefinitions="Auto, 8, *"> | ||
<avalonia:MaterialIcon Kind="LinuxMint" /> | ||
<TextBlock Text="Mint Linux" Grid.Column="2" /> | ||
</Grid> | ||
</TreeViewItem.Header> | ||
</TreeViewItem> | ||
<TreeViewItem Header="Pop!_OS" /> | ||
<TreeViewItem Header="Lubuntu" /> | ||
<TreeViewItem Header="Zorin OS" /> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
</TreeViewItem> | ||
</TreeView> | ||
</Grid> | ||
</controls:Card> | ||
</showMeTheXaml:XamlDisplay> | ||
</WrapPanel> | ||
</StackPanel> | ||
</UserControl> | ||
|