Skip to content

Commit fce875c

Browse files
authored
Merge branch 'master' into improved-rename
2 parents 0e38f2c + bb9e94e commit fce875c

File tree

6 files changed

+93
-328
lines changed

6 files changed

+93
-328
lines changed

Files UWP/GenericFileBrowser.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
</Grid.ContextFlyout>
200200
<ProgressBar x:Name="progBar" Height="10" VerticalAlignment="Top" IsIndeterminate="True"/>
201201
<TextBlock Visibility="{x:Bind Mode=TwoWay, Path=TextState.isVisible, UpdateSourceTrigger=PropertyChanged}" x:Name="EmptyText" HorizontalAlignment="Center" Text="This folder is empty." TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,125,0,0"/>
202-
<controls:DataGrid ItemsSource="{x:Bind viewModelInstance.FilesAndFolders}" ScrollViewer.IsScrollInertiaEnabled="True" ClipboardCopyMode="None" RowDetailsVisibilityMode="Collapsed" AllowDrop="True" Drop="AllView_DropAsync" DragLeave="AllView_DragLeave" DragStarting="AllView_DragStarting" SelectionChanged="AllView_SelectionChanged" Margin="24,24,0,0" Grid.Row="3" PreparingCellForEdit="AllView_PreparingCellForEdit" CellEditEnding="AllView_CellEditEnding" FocusVisualPrimaryThickness="0" SelectionMode="Extended" IsDoubleTapEnabled="True" x:FieldModifier="public" x:Name="AllView" AutoGenerateColumns="False" CanDrag="True" DragOver="AllView_DragOver" IsRightTapEnabled="True" CanUserReorderColumns="False" HorizontalAlignment="Left">
202+
<controls:DataGrid ItemsSource="{x:Bind viewModelInstance.FilesAndFolders}" PreviewKeyDown="AllView_PreviewKeyDown" ScrollViewer.IsScrollInertiaEnabled="True" ClipboardCopyMode="None" RowDetailsVisibilityMode="Collapsed" AllowDrop="True" Drop="AllView_DropAsync" DragLeave="AllView_DragLeave" DragStarting="AllView_DragStarting" SelectionChanged="AllView_SelectionChanged" Margin="24,24,0,0" Grid.Row="3" PreparingCellForEdit="AllView_PreparingCellForEdit" CellEditEnding="AllView_CellEditEnding" FocusVisualPrimaryThickness="0" SelectionMode="Extended" IsDoubleTapEnabled="True" x:FieldModifier="public" x:Name="AllView" AutoGenerateColumns="False" CanDrag="True" DragOver="AllView_DragOver" IsRightTapEnabled="True" CanUserReorderColumns="False" HorizontalAlignment="Left">
203203
<controls:DataGrid.Resources>
204204
<SolidColorBrush x:Key="DataGridCellFocusVisualPrimaryBrush" Color="Transparent"/>
205205
<SolidColorBrush x:Key="DataGridCellFocusVisualSecondaryBrush" Color="Transparent"/>

Files UWP/GenericFileBrowser.xaml.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
using Windows.UI.Core;
1414
using System.Text.RegularExpressions;
1515
using System.IO;
16+
using Windows.System;
17+
using Windows.UI.Xaml.Input;
1618

1719
namespace Files
1820
{
@@ -317,6 +319,15 @@ private void RightClickContextMenu_Opened(object sender, object e)
317319
OpenInNewWindowItem.Visibility = Visibility.Visible;
318320
}
319321
}
322+
323+
private void AllView_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
324+
{
325+
if (e.Key == VirtualKey.Enter)
326+
{
327+
tabInstance.instanceInteraction.List_ItemClick(null, null);
328+
e.Handled = true;
329+
}
330+
}
320331
}
321332

322333
public class EmptyFolderTextState : INotifyPropertyChanged

0 commit comments

Comments
 (0)