diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-21 16:24:37 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-11-21 16:24:37 +0200 |
| commit | a9c3aaed4d5c007f138bfc16f05aecdee73f1268 (patch) | |
| tree | bc41f31dec6a0f96e4c6e16372f8884053c7c17f /Software/Visual_Studio/Tango.Explorer | |
| parent | 9ee373ebf7518c96fdf685da792568680dd7f135 (diff) | |
| download | Tango-a9c3aaed4d5c007f138bfc16f05aecdee73f1268.tar.gz Tango-a9c3aaed4d5c007f138bfc16f05aecdee73f1268.zip | |
Working on PPC Storage Provider !!!
Diffstat (limited to 'Software/Visual_Studio/Tango.Explorer')
| -rw-r--r-- | Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs index 6f276f184..0c713a7db 100644 --- a/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs +++ b/Software/Visual_Studio/Tango.Explorer/ExplorerControl.cs @@ -53,6 +53,14 @@ namespace Tango.Explorer public static readonly DependencyProperty BackCommandProperty = DependencyProperty.Register("BackCommand", typeof(RelayCommand), typeof(ExplorerControl), new PropertyMetadata(null)); + public RelayCommand<ExplorerFileItem> FileSelectedCommand + { + get { return (RelayCommand<ExplorerFileItem>)GetValue(FileSelectedCommandProperty); } + set { SetValue(FileSelectedCommandProperty, value); } + } + public static readonly DependencyProperty FileSelectedCommandProperty = + DependencyProperty.Register("FileSelectedCommand", typeof(RelayCommand<ExplorerFileItem>), typeof(ExplorerControl), new PropertyMetadata(null)); + static ExplorerControl() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ExplorerControl), new FrameworkPropertyMetadata(typeof(ExplorerControl))); @@ -99,16 +107,23 @@ namespace Tango.Explorer CurrentFolder = folder; SelectedItem = null; } + else if (SelectedItem is ExplorerFileItem) + { + FileSelectedCommand?.Execute(SelectedItem); + } } } private void NavigateBack() { - var parentPath = CurrentFolder.GetParentPath(); - - if (parentPath != null) + if (CurrentFolder != null) { - CurrentFolder = ExplorerFolderItem.LoadFromPath(parentPath); + var parentPath = CurrentFolder.GetParentPath(); + + if (parentPath != null) + { + CurrentFolder = ExplorerFolderItem.LoadFromPath(parentPath); + } } } } |
