Skip to content

Commit 722f9ef

Browse files
committed
Expand Properties Box Access
1 parent 9a3fdbf commit 722f9ef

File tree

7 files changed

+12
-19
lines changed

7 files changed

+12
-19
lines changed

Files UWP/GenericFileBrowser.xaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,18 +168,11 @@
168168
<KeyboardAccelerator Modifiers="Control" Key="V"/>
169169
</MenuFlyoutItem.KeyboardAccelerators>
170170
</MenuFlyoutItem>
171-
<MenuFlyoutItem Text="Open in PowerShell...">
171+
<MenuFlyoutItem IsEnabled="False" Text="Open in PowerShell...">
172172
<MenuFlyoutItem.Icon>
173173
<FontIcon Glyph="&#xE756;"/>
174174
</MenuFlyoutItem.Icon>
175175
</MenuFlyoutItem>
176-
<MenuFlyoutSeparator/>
177-
<MenuFlyoutItem Text="Properties">
178-
<MenuFlyoutItem.Icon>
179-
<FontIcon Glyph="&#xE946;"/>
180-
</MenuFlyoutItem.Icon>
181-
</MenuFlyoutItem>
182-
183176
</MenuFlyout.Items>
184177
</MenuFlyout>
185178
</Grid.ContextFlyout>

Files UWP/GenericFileBrowser.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
100100
AllView.DoubleTapped += instanceInteraction.List_ItemClick;
101101

102102
var CurrentInstance = ItemViewModel<GenericFileBrowser>.GetCurrentSelectedTabInstance<ProHome>();
103+
PropertiesItem.Click += CurrentInstance.ShowPropertiesButton_Click;
103104
CurrentInstance.BackButton.IsEnabled = CurrentInstance.accessibleContentFrame.CanGoBack;
104105
CurrentInstance.ForwardButton.IsEnabled = CurrentInstance.accessibleContentFrame.CanGoForward;
105106
CurrentInstance.RefreshButton.IsEnabled = true;

Files UWP/PhotoAlbum.xaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,10 +395,9 @@
395395
<KeyboardAccelerator Modifiers="Control" Key="V"/>
396396
</MenuFlyoutItem.KeyboardAccelerators>
397397
</MenuFlyoutItem>
398-
<MenuFlyoutSeparator/>
399-
<MenuFlyoutItem Click="PropertiesItemGrid_Click" Text="Properties" Name="PropertiesItemGrid">
398+
<MenuFlyoutItem IsEnabled="False" Text="Open in PowerShell...">
400399
<MenuFlyoutItem.Icon>
401-
<FontIcon Glyph="&#xE946;"/>
400+
<FontIcon Glyph="&#xE756;"/>
402401
</MenuFlyoutItem.Icon>
403402
</MenuFlyoutItem>
404403
</MenuFlyout.Items>

Files UWP/PhotoAlbum.xaml.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,10 @@ private void CopyItem_Click(object sender, RoutedEventArgs e)
203203
instanceInteraction.CopyItem_ClickAsync(null, null);
204204
}
205205

206-
private async void PropertiesItem_Click(object sender, RoutedEventArgs e)
206+
private void PropertiesItem_Click(object sender, RoutedEventArgs e)
207207
{
208-
ItemViewModel<PhotoAlbum>.GetCurrentSelectedTabInstance<ProHome>().accessiblePropertiesFrame.Navigate(typeof(Properties), (this.gv.SelectedItem as ListedItem).FilePath, new SuppressNavigationTransitionInfo());
209-
await ItemViewModel<PhotoAlbum>.GetCurrentSelectedTabInstance<ProHome>().propertiesBox.ShowAsync();
210-
208+
var CurrentInstance = ItemViewModel<PhotoAlbum>.GetCurrentSelectedTabInstance<ProHome>();
209+
CurrentInstance.ShowPropertiesButton_Click(null, null);
211210
}
212211

213212
private void RefreshGrid_Click(object sender, RoutedEventArgs e)

Files UWP/ProHome.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@
776776
<TextBox Padding="8" Name="RenameInput" PlaceholderText="Enter an item name without the file extension" Width="300"/>
777777
</Grid>
778778
</ContentDialog>
779-
<ContentDialog Windows10version1809:CornerRadius="4" Name="PropertiesDialog" Grid.RowSpan="4" Title="Properties" >
779+
<ContentDialog Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Windows10version1809:CornerRadius="4" Name="PropertiesDialog" Grid.RowSpan="4" Title="Properties" >
780780
<Windows10version1903:ContentDialog.Shadow>
781781
<Windows10version1903:ThemeShadow/>
782782
</Windows10version1903:ContentDialog.Shadow>

Files UWP/ProHome.xaml.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ private void NameDialog_SecondaryButtonClick(ContentDialog sender, ContentDialog
905905
{
906906
inputForRename = null;
907907
}
908-
//AppWindow propertiesWindow;
908+
909909
public async void ShowPropertiesButton_Click(object sender, RoutedEventArgs e)
910910
{
911911
if (this.accessibleContentFrame.SourcePageType == typeof(GenericFileBrowser))
@@ -915,14 +915,15 @@ public async void ShowPropertiesButton_Click(object sender, RoutedEventArgs e)
915915
}
916916
else if (this.accessibleContentFrame.SourcePageType == typeof(PhotoAlbum))
917917
{
918+
propertiesFrame.Tag = PropertiesDialog;
918919
propertiesFrame.Navigate(typeof(Properties), (ItemViewModel<ProHome>.GetCurrentSelectedTabInstance<ProHome>().accessibleContentFrame.Content as PhotoAlbum).gv.SelectedItems, new SuppressNavigationTransitionInfo());
919920
}
920921
await PropertiesDialog.ShowAsync(ContentDialogPlacement.Popup);
921922
}
922923

923924
public void PropertiesWindow_CancelButton_Click(object sender, RoutedEventArgs e)
924925
{
925-
//propertiesWindow.RequestSize(new Windows.Foundation.Size(200, 450));
926+
926927
}
927928

928929
private void RibbonTip_Loaded(object sender, RoutedEventArgs e)

Files UWP/Properties.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
3434
var result = e.Parameter as IEnumerable;
3535
IList<ListedItem> listedItems = result.OfType<ListedItem>().ToList();
3636
Item = listedItems[0];
37-
PropertiesDialog = Frame.Tag as ContentDialog;
37+
PropertiesDialog = Frame.Tag as ContentDialog;
3838
base.OnNavigatedTo(e);
3939
}
4040
private void OK_Button_Click(object sender, RoutedEventArgs e)

0 commit comments

Comments
 (0)