aboutsummaryrefslogtreecommitdiffstatsci
path: root/Templates/FileDialog.template
blob: d9f93ed4452131203b49f5491193837663e7fd92 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?xml version="1.0"?>
<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}"
				Background="{./Background}"
				MouseEnter="./onBorderMouseEnter"
				MouseLeave="./onBorderMouseLeave">
	<VerticalStack Spacing="0">
		<HorizontalStack Background="{./TitleBarBackground}"
				Name="hs" Margin="2" Spacing="0" Height="Fit">
			<GraphicObject Width="5"/>
			<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
			<Label Width="Stretched" Foreground="{./TitleBarForeground}" Margin="1" TextAlignment="Center" Text="{./Caption}" />
			<Border CornerRadius="0" BorderWidth="1" Foreground="Transparent"  Height="12" Width="12"
				MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
				<Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
					 MouseClick="./butQuitPress"/>
			</Border>
			<GraphicObject Width="5"/>
		</HorizontalStack>
		<Container Name="Content" MinimumSize="50,50" Background="Onyx">
			<VerticalStack Margin="1">
				<HorizontalStack Height="Fit">
					<Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
						<Image Margin="2" Width="14" Height="14"
							Path="#Crow.Icons.level-up.svg"/>
					</Button>
					<TextBox Style="TxtInFileDialog" Text="{²./CurrentDirectory}"/>
				</HorizontalStack>
				<DirectoryView ShowHidden="{²../cbShowHidden.IsChecked}" FileMask="{²../txtFileMask.Text}" ShowFiles="{²../cbShowFiles.IsChecked}" Name="fv" CurrentDirectory="{./CurrentDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
						Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
					<Template>
						<ListBox ItemTemplate="#Crow.Templates.FileItems.template" Name="fileView" Data="{./FileSystemEntries}"
							SelectedItemChanged="./onSelectedItemChanged">
							<Template>
								<HorizontalStack>
									<Scroller ScrollX="{../scrollbar1.Value}"  Name="scroller1"
										VerticalScrolling="true" HorizontalScrolling="false">
										<VerticalStack Height="Fit" VerticalAlignment="Top"
											Name="ItemsContainer" Margin="0" Spacing="1"/>
									</Scroller>
									<ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
										LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
										CursorSize="{../scroller1.ChildHeightRatio}"
										Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
										Width="14" />
								</HorizontalStack>
							</Template>
						</ListBox>
					</Template>
				</DirectoryView>
				<HorizontalStack Height="Fit">
					<TextBox Style="TxtInFileDialog" Text="{²./SelectedFile}"/>
					<TextBox Style="TxtInFileDialog" Width="50" Name="txtFileMask" Text="{²./SearchPattern}"/>
				</HorizontalStack>
				<HorizontalStack Margin="5" Fit="true" HorizontalAlignment="Right">
					<CheckBox Style="CheckBoxAlt" Name="cbShowFiles" Caption="Show Files" IsChecked="{²./ShowFiles}"/>
					<CheckBox Style="CheckBoxAlt" Name="cbShowHidden" Caption="Show Hidden" IsChecked="{²./ShowHidden}"/>
				</HorizontalStack>
				<HorizontalStack Fit="true" HorizontalAlignment="Right">
					<Button Caption="Ok" MouseClick="./onFileSelect"/>
					<Button Caption="Cancel" MouseClick="./onCancel"/>
				</HorizontalStack>
			</VerticalStack>
		</Container>
	</VerticalStack>
</Border>