blob: 55d652a9b6bd40689baad8a79aabd1cac26e9eb5 (
plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
|
<?xml version="1.0"?>
<TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}" Background="{./Background}"
SelectedItemChanged="./onSelectedItemChanged">
<ItemTemplate DataType="System.IO.FileInfo">
<HorizontalStack Focusable="true" Height="Fit" Width="Stretched" >
<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>
<HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
MouseLeave="{Background=Transparent}">
<Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
MouseEnter="{Background=LightGray}"
MouseLeave="{Background=Transparent}">
<Image
Path="{./Image}"
Visible="{./IsExpandable}"
SvgSub="{./IsExpanded}"/>
</Container>
<Image Margin="2" Width="14" Height="14"
Path="#Crow.Images.Icons.folder.svg"/>
<Label Text="{./Caption}"/>
</HorizontalStack>
<Container Name="Content" Visible="false"/>
</VerticalStack>
</Template>
<HorizontalStack Height="Fit">
<GraphicObject Width="12" Height="10"/>
<TreeView Name="List" Height="Fit"
Template="#Crow.Templates.treeList.crow" />
</HorizontalStack>
</Expandable>
</ItemTemplate>
</TreeView>
|