blob: bf3a6f46bfa3cdfe57ce1bb89c5a2bdc1e244017 (
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
43
44
45
|
<?xml version="1.0"?>
<TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}" Background="{./Background}"
SelectedItemChanged="./onSelectedItemChanged">
<ItemTemplate DataType="System.IO.FileInfo">
<Border CornerRadius="2" Margin="0" Focusable="true" Height="Fit" Width="Stretched" Foreground="Transparent"
MouseEnter="{Foreground=DimGray}"
MouseLeave="{Foreground=Transparent}">
<HorizontalStack>
<Image Margin="1" Width="14" Height="14"
Path="#Crow.Icons.file.svg"/>
<Label Text="{Name}" Width="Stretched"/>
</HorizontalStack>
</Border>
</ItemTemplate>
<ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfos">
<Expandable Caption="{Name}" >
<Template>
<VerticalStack>
<Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand"
Foreground="Transparent"
MouseEnter="{Foreground=DimGray}"
MouseLeave="{Foreground=Transparent}">
<HorizontalStack Spacing="1">
<Image Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
Path="{./Image}"
Visible="{./IsExpandable}"
SvgSub="{./IsExpanded}"
MouseEnter="{Background=LightGray}"
MouseLeave="{Background=Transparent}"/>
<Image Margin="1" Width="14" Height="14"
Path="#Crow.Icons.folder.svg"/>
<Label Text="{./Caption}"/>
</HorizontalStack>
</Border>
<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>
|