diff options
Diffstat (limited to 'Samples')
| -rw-r--r-- | Samples/ShowCase/ShowCase.cs | 7 | ||||
| -rw-r--r-- | Samples/ShowCase/ui/showcase.crow | 8 |
2 files changed, 14 insertions, 1 deletions
diff --git a/Samples/ShowCase/ShowCase.cs b/Samples/ShowCase/ShowCase.cs index 8f3c70ec..daab96e2 100644 --- a/Samples/ShowCase/ShowCase.cs +++ b/Samples/ShowCase/ShowCase.cs @@ -32,6 +32,13 @@ namespace ShowCase NotifyValueChanged ("CurrentDir",CurrentDir); } } + public void goUpDirClick (object sender, MouseButtonEventArgs e) + { + string root = Directory.GetDirectoryRoot (CurrentDir); + if (CurrentDir == root) + return; + CurrentDir = Directory.GetParent (CurrentDir).FullName; + } protected override void OnInitialized () { diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow index 319021bf..ae8912fe 100644 --- a/Samples/ShowCase/ui/showcase.crow +++ b/Samples/ShowCase/ui/showcase.crow @@ -1,6 +1,12 @@ <?xml version="1.0"?> <HorizontalStack Background="DarkGrey" Margin="2"> - <DirectoryView Name="dv" CurrentDirectory="Interfaces" Width="25%" SelectedItemChanged="Dv_SelectedItemChanged"/> + <VerticalStack Width="25%"> + <HorizontalStack Height="Fit"> + <Image Margin="2" Width="14" Height="14" Path="#Crow.Icons.level-up.svg" MouseClick="./goUpDirClick"/> + <TextBox Text="{²CurrentDir}" Margin="2"/> + </HorizontalStack> + <DirectoryView Name="dv" CurrentDirectory="{CurrentDir}" SelectedItemChanged="Dv_SelectedItemChanged"/> + </VerticalStack> <Splitter Width="6"/> <VerticalStack> <Container Name="CrowContainer" Height="60%" Background="Black"/> |