diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-02-10 15:54:50 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-02-10 15:54:50 +0100 |
| commit | 456e7c847a4aa6fed44cc2d970ac9400ea54d0c4 (patch) | |
| tree | 42dc38f31028f3854f55a8203390ed922dd8cd5a /Templates/FileDialog2.template | |
| parent | 5ca711641d1934adf08d2675641e3f61647f3ffc (diff) | |
TextBox, Label, simpler SVG icon for file sys viewers (improve speed a lot), divers debug and code clean
Diffstat (limited to 'Templates/FileDialog2.template')
| -rw-r--r-- | Templates/FileDialog2.template | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/Templates/FileDialog2.template b/Templates/FileDialog2.template new file mode 100644 index 00000000..389e11f3 --- /dev/null +++ b/Templates/FileDialog2.template @@ -0,0 +1,120 @@ +<?xml version="1.0"?> +<Border BorderWidth="1" Foreground="White" CornerRadius="{./CornerRadius}" + Background="{./Background}" + MouseEnter="./onBorderMouseEnter" + MouseLeave="./onBorderMouseLeave"> + <VerticalStack Spacing="0"> + <HorizontalStack Background="vgradient|0:0.4,0.6,0.0,0.5|1:0.0,0.8,0.8,0.9" + Name="hs" Margin="2" Spacing="0" Height="Fit"> + <GraphicObject Width="5"/> + <Image Margin="1" Width="12" Height="12" Path="{./Icon}"/> + <Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" /> + <Border CornerRadius="6" 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 Caption="Up" MouseClick="./goUpDirClick"/> + <TextBox Text="{²./CurrentDirectory}"/> + </HorizontalStack> + <HorizontalStack Spacing="1"> + <DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}" Width="50%" Margin="0" + SelectedItemChanged="./onFVSelectedItemChanged"> + <Template> + <TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}" + SelectedItemChanged="./onSelectedItemChanged"> + <ItemTemplate DataType="System.IO.FileInfo"> + <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" > + <Image Margin="2" Width="14" Height="14" + Path="#Crow.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="GetDirectories"> + <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.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> + </Template> + </DirectoryView> + <Splitter/> + <DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{./SelectedDirectory}" SelectedItemChanged="./onFVSelectedItemChanged" + Width="100%" Margin="0" MouseDoubleClick="./onFileSelect"> + <Template> + <ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged"> + <Template> + <VerticalStack> + <Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1" + VerticalScrolling="False" HorizontalScrolling="true"> + <Wrapper Orientation="Horizontal" Width="Fit" HorizontalAlignment="Left" + Name="ItemsContainer" Margin="0" Spacing="1"/> + </Scroller> + <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}" + Maximum="{../scroller1.MaximumScroll}" Orientation="Horizontal" + Height="14" /> + </VerticalStack> + </Template> + <ItemTemplate DataType="System.IO.FileInfo"> + <HorizontalStack Focusable="true" Height="Fit" > + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Icons.file.svg"/> + <Label Text="{Name}" + MouseEnter="{Background=BlueCrayola}" + MouseLeave="{Background=Transparent}"/> + </HorizontalStack> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo"> + <HorizontalStack Focusable="true" Height="Fit" > + <Image Margin="2" Width="14" Height="14" + Path="#Crow.Icons.folder.svg"/> + <Label Text="{Name}" + MouseEnter="{Background=BlueCrayola}" + MouseLeave="{Background=Transparent}"/> + </HorizontalStack> + </ItemTemplate> + </ListBox> + </Template> + </DirectoryView> + </HorizontalStack> + <TextBox Text="{./SelectedDirectory}"/> + <TextBox Text="{²./SelectedFile}"/> + <HorizontalStack Fit="true" HorizontalAlignment="Right"> + <Button Caption="Ok" MouseClick="./onFileSelect"/> + <Button Caption="Cancel" MouseClick="./onCancel"/> + </HorizontalStack> + </VerticalStack> + </Container> + </VerticalStack> +</Border> |