diff options
Diffstat (limited to 'Tests/Interfaces/TemplatedContainer/testTreeView.crow')
| -rwxr-xr-x | Tests/Interfaces/TemplatedContainer/testTreeView.crow | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Tests/Interfaces/TemplatedContainer/testTreeView.crow b/Tests/Interfaces/TemplatedContainer/testTreeView.crow new file mode 100755 index 00000000..3a44bf34 --- /dev/null +++ b/Tests/Interfaces/TemplatedContainer/testTreeView.crow @@ -0,0 +1,41 @@ +<?xml version="1.0"?> +<TreeView IsRoot="true" Name="treeView" Data="{CurDirectory}" Background="DimGray"> + <ItemTemplate DataType="System.IO.FileInfo"> + <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" > + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Images.Icons.file.svg"/> + <Label Text="{Name}" Width="Stretched" + MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}" + MouseLeave="{Background=Transparent}"/> + </HorizontalStack> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos"> + <Expandable Caption="{Name}" > + <Template> + <VerticalStack Height="{./HeightPolicy}" Width="{./WidthPolicy}"> + <HorizontalStack Spacing="1" Height="Fit" Width="{./WidthPolicy}" + MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}" + MouseLeave="{Background=Transparent}"> + <Image Margin="2" Width="12" Height="12" + Visible="{./HasContent}" + Path="{./Image}" + SvgSub="{./IsExpanded}"/> + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Images.Icons.folder.svg"/> + <Label Text="{./Caption}" Width="{./WidthPolicy}"/> + </HorizontalStack> + <Container Name="Content" Visible="false" + Height="{./HeightPolicy}" Width="{./WidthPolicy}"/> + </VerticalStack> + </Template> + <HorizontalStack Height="Fit" Width="{./WidthPolicy}"> + <GraphicObject Width="12" Height="10"/> + <TreeView Name="List" Height="Fit" Width="{./WidthPolicy}"> + <Template> + <VerticalStack Height="Fit" Width="{../WidthPolicy}" Name="List"/> + </Template> + </TreeView> + </HorizontalStack> + </Expandable> + </ItemTemplate> +</TreeView> |