diff options
Diffstat (limited to 'Samples/ShowCase/ui')
| -rw-r--r-- | Samples/ShowCase/ui/showcase.crow | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow index 529c4772..1236b705 100644 --- a/Samples/ShowCase/ui/showcase.crow +++ b/Samples/ShowCase/ui/showcase.crow @@ -6,7 +6,57 @@ Background="Jet" MouseEnter="{Background=Grey}" MouseLeave="{Background=Jet}" /> <TextBox Text="{²CurrentDir}" Margin="2"/> </HorizontalStack> - <DirectoryView Margin="1" Name="dv" CurrentDirectory="{CurrentDir}" SelectedItemChanged="Dv_SelectedItemChanged"/> + <DirectoryView Margin="1" Name="dv" CurrentDirectory="{CurrentDir}" SelectedItemChanged="Dv_SelectedItemChanged"> + <Template> + <TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}" Background="{./Background}" + SelectedItemChanged="./onSelectedItemChanged"> + <ItemTemplate DataType="System.IO.FileInfo"> + <ListItem CornerRadius="2" Margin="0" Height="Fit" Width="Stretched" + ContextCommands="{GetCommands}" + Selected="{Background=${ControlHighlight}}" + Unselected="{Background=Transparent}"> + <HorizontalStack> + <Image Margin="1" Width="14" Height="14" Path="#Crow.Icons.file.svg"/> + <Label Text="{Name}" Width="Stretched"/> + </HorizontalStack> + </ListItem> + </ItemTemplate> + <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetFileSystemInfosOrdered"> + <ListItem ContextCommands="{GetCommands}" + Selected="{/exp.Background=${ControlHighlight}}" + Unselected="{/exp.Background=Transparent}"> + <Expandable Name="exp" Caption="{Name}" MouseDoubleClick="/onClickForExpand"> + <Template> + <VerticalStack> + <Border CornerRadius="2" Margin="0" Height="Fit" MouseDoubleClick="./onClickForExpand" + Foreground="Transparent" + MouseEnter="{Foreground=DimGrey}" + MouseLeave="{Foreground=Transparent}"> + <HorizontalStack Background="{./Background}" Spacing="1"> + <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand" + Path="{./Image}" + Visible="{./IsExpandable}" + SvgSub="{./IsExpanded}" + MouseEnter="{Background=LightGrey}" + MouseLeave="{Background=Transparent}"/> + <Image Margin="1" Width="16" Height="16" + Path="#Crow.Icons.folder.svg" SvgSub="{./IsExpanded}"/> + <Label Text="{./Caption}"/> + </HorizontalStack> + </Border> + <Container Name="Content" Visible="false"/> + </VerticalStack> + </Template> + <HorizontalStack Height="Fit"> + <Widget Width="12" Height="10"/> + <VerticalStack Height="Fit" Name="ItemsContainer"/> + </HorizontalStack> + </Expandable> + </ListItem> + </ItemTemplate> + </TreeView> + </Template> + </DirectoryView> </VerticalStack> <Splitter Width="6" /> <VerticalStack> @@ -31,9 +81,9 @@ <Button Style="IcoButton" Command="{CMDNew}" /> <Button Style="IcoButton" Command="{CMDSave}" /> <Button Style="IcoButton" Command="{CMDSaveAs}" /> - <!--<Button Style="IcoButton" Command="{CMDUndo}" /> + <Button Style="IcoButton" Command="{CMDUndo}" /> <Button Style="IcoButton" Command="{CMDRedo}" /> - <Button Style="IcoButton" Command="{CMDCut}" /> + <!--<Button Style="IcoButton" Command="{CMDCut}" /> <Button Style="IcoButton" Command="{CMDCopy}" /> <Button Style="IcoButton" Command="{CMDPaste}" />--> <Popper IsVisible="{DebugLoggingEnabled}" Fit="true"> |