aboutsummaryrefslogtreecommitdiffstatsci
path: root/Templates/DirectoryView.template
blob: 2e42ae91a79b760f10e5d9dfa8ca720d58f8f99f (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
<?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="9" Height="9" Focusable="true" MouseDown="./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"/>
				<VerticalStack Height="Fit" Name="ItemsContainer"/>
			</HorizontalStack>
		</Expandable>
	</ItemTemplate>
</TreeView>