Skip to content

Commit 107fe6b

Browse files
lukeblukeb
authored andcommitted
Squash Light-Dismiss Bug
1 parent b65e85a commit 107fe6b

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

Files UWP/App.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
using Windows.UI;
99
using Windows.UI.Xaml;
1010
using Windows.UI.Xaml.Controls;
11+
using Windows.UI.Xaml.Media.Animation;
1112
using Windows.UI.Xaml.Navigation;
1213

1314
namespace Files
@@ -102,7 +103,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs e)
102103
// When the navigation stack isn't restored navigate to the first page,
103104
// configuring the new page by passing required information as a navigation
104105
// parameter
105-
rootFrame.Navigate(typeof(ProHome), e.Arguments);
106+
rootFrame.Navigate(typeof(ProHome), e.Arguments, new SuppressNavigationTransitionInfo());
106107

107108

108109
}

Files UWP/GenericFileBrowser.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ protected override void OnNavigatedTo(NavigationEventArgs eventArgs)
148148
App.PathText.Text = parameters;
149149
}
150150

151-
if(Interaction.dataGridRows != null)
151+
if (Interaction.dataGridRows != null)
152152
{
153153

154154
}

Files UWP/ProHome.xaml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
</Setter.Value>
3535
</Setter>
3636
</Style>
37+
3738
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundSelected" Color="{StaticResource SystemChromeLowColor}"/>
3839
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPointerOver" Color="{StaticResource SystemChromeLowColor}"/>
3940
<SolidColorBrush x:Key="TabViewItemHeaderBackgroundPressed" Color="{StaticResource SystemChromeLowColor}"/>
@@ -865,6 +866,8 @@
865866
</Setter.Value>
866867
</Setter>
867868
</Style>
869+
870+
868871
</Page.Resources>
869872

870873
<Grid Padding="0,0,0,0">
@@ -873,23 +876,23 @@
873876
<RowDefinition Height="*"/>
874877
</Grid.RowDefinitions>
875878
<Grid Grid.Row="0" Canvas.ZIndex="2">
876-
<Custom:DropShadowPanel OffsetY="-2" HorizontalContentAlignment="Stretch">
879+
<Custom:DropShadowPanel OffsetY="-2" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch">
877880
<StackPanel Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Orientation="Vertical">
878-
<Custom:TabView x:Name="Ribbon" SelectedIndex="1" TabWidthBehavior="Actual" Background="Transparent" Template="{StaticResource TabViewTemplate1}">
879-
<Custom:TabViewItem BorderThickness="0" Template="{StaticResource TabViewItemFluentTemplate}" Header="File">
880-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
881+
<Custom:TabView x:Name="Ribbon" TabWidthBehavior="Actual" Background="Transparent" Template="{StaticResource TabViewTemplate1}">
882+
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="File">
883+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
881884
<CommandBar.Content>
882-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
885+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
883886
<AppBarButton Label="Open new window" Icon="NewWindow"/>
884887
<AppBarButton Label="Settings" Icon="Setting"/>
885888
</CommandBar>
886889
</CommandBar.Content>
887890
</CommandBar>
888891
</Custom:TabViewItem>
889-
<Custom:TabViewItem IsSelected="True" BorderThickness="0" Template="{StaticResource TabViewItemFluentTemplate}" Header="Home">
890-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
892+
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" IsSelected="True" BorderThickness="0" Header="Home">
893+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
891894
<CommandBar.Content>
892-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
895+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
893896
<AppBarButton IsEnabled="{x:Bind local:App.HomeItems.isEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Cut" Icon="Cut"/>
894897
<AppBarButton IsEnabled="{x:Bind local:App.HomeItems.isEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Copy" Icon="Copy"/>
895898
<AppBarButton IsEnabled="{x:Bind local:App.HomeItems.isEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Paste" Icon="Paste"/>
@@ -913,19 +916,19 @@
913916
</CommandBar.Content>
914917
</CommandBar>
915918
</Custom:TabViewItem>
916-
<Custom:TabViewItem BorderThickness="0" Template="{StaticResource TabViewItemFluentTemplate}" Header="Share">
917-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
919+
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="Share">
920+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
918921
<CommandBar.Content>
919-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
922+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
920923
<AppBarButton IsEnabled="{x:Bind local:App.ShareItems.isEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Share" Icon="Share"/>
921924
</CommandBar>
922925
</CommandBar.Content>
923926
</CommandBar>
924927
</Custom:TabViewItem>
925-
<Custom:TabViewItem BorderThickness="0" Template="{StaticResource TabViewItemFluentTemplate}" Header="Layout">
926-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
928+
<Custom:TabViewItem Template="{StaticResource TabViewItemFluentTemplate}" BorderThickness="0" Header="Layout">
929+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
927930
<CommandBar.Content>
928-
<CommandBar Background="Transparent" IsOpen="True" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
931+
<CommandBar Background="Transparent" OverflowButtonVisibility="Collapsed" DefaultLabelPosition="Right">
929932
<AppBarButton IsEnabled="{x:Bind local:App.LayoutItems.isEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Label="Layout Mode">
930933
<AppBarButton.Icon>
931934
<FontIcon Glyph="&#xF246;" FontFamily="Segoe MDL2 Assets"/>
@@ -988,7 +991,7 @@
988991
</Custom:DropShadowPanel>
989992
</Grid>
990993

991-
<SplitView Canvas.ZIndex="0" DisplayMode="Inline" OpenPaneLength="225" IsPaneOpen="True" HorizontalAlignment="Stretch" Grid.RowSpan="1" Grid.Row="1" VerticalAlignment="Stretch" PaneBackground="{ThemeResource SystemControlChromeHighAcrylicWindowMediumBrush}" >
994+
<SplitView DisplayMode="Inline" OpenPaneLength="225" IsPaneOpen="True" HorizontalAlignment="Stretch" Grid.RowSpan="1" Grid.Row="1" VerticalAlignment="Stretch" PaneBackground="{ThemeResource SystemControlChromeHighAcrylicWindowMediumBrush}" >
992995
<SplitView.Pane>
993996
<ScrollViewer>
994997
<Grid>
@@ -1076,18 +1079,18 @@
10761079
</ScrollViewer>
10771080
</SplitView.Pane>
10781081

1079-
<Frame IsRightTapEnabled="True" Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Name="ItemDisplayFrame"/>
1082+
<Frame Background="{StaticResource ApplicationPageBackgroundThemeBrush}" Name="ItemDisplayFrame"/>
10801083

10811084
</SplitView>
1082-
<ContentDialog Grid.RowSpan="2" DefaultButton="Primary" PrimaryButtonClick="PermissionDialog_PrimaryButtonClick" PrimaryButtonText="Grant Permission" Name="PermissionDialog" Title="Welcome to Files UWP">
1085+
<ContentDialog DefaultButton="Primary" PrimaryButtonClick="PermissionDialog_PrimaryButtonClick" PrimaryButtonText="Grant Permission" Name="PermissionDialog" Title="Welcome to Files UWP">
10831086
<Grid>
10841087
<TextBlock TextWrapping="WrapWholeWords" Text="To get started, we need you to grant us permission to show you your files. This will open a Settings page where you can grant us permission. Files will close in the process, so don't be afraid to come back! "/>
10851088
</Grid>
10861089
</ContentDialog>
1087-
<ContentDialog Background="{StaticResource ApplicationPageBackgroundThemeBrush}" BorderThickness="0" Name="AddDialog" PrimaryButtonText="Cancel" Grid.RowSpan="4">
1090+
<ContentDialog Background="{StaticResource ApplicationPageBackgroundThemeBrush}" BorderThickness="0" Name="AddDialog" PrimaryButtonText="Cancel">
10881091
<Frame Width="450" Name="AddDialogFrame"/>
10891092
</ContentDialog>
1090-
<ContentDialog Background="{StaticResource ApplicationPageBackgroundThemeBrush}" DefaultButton="Primary" Title="Name this item" BorderThickness="0" PrimaryButtonClick="NameDialog_PrimaryButtonClick" Name="NameDialog" PrimaryButtonText="Set Name" SecondaryButtonText="Cancel" Grid.RowSpan="4">
1093+
<ContentDialog Background="{StaticResource ApplicationPageBackgroundThemeBrush}" DefaultButton="Primary" Title="Name this item" BorderThickness="0" PrimaryButtonClick="NameDialog_PrimaryButtonClick" Name="NameDialog" PrimaryButtonText="Set Name" SecondaryButtonText="Cancel">
10911094
<Grid>
10921095
<TextBox Padding="8" Name="RenameInput" PlaceholderText="Enter an item name without the file extension" Width="300"/>
10931096
</Grid>

Files UWP/ProHome.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using Windows.UI.Xaml.Data;
2323
using Windows.UI.Xaml.Input;
2424
using Windows.UI.Xaml.Media;
25+
using Windows.UI.Xaml.Media.Animation;
2526
using Windows.UI.Xaml.Navigation;
2627

2728
namespace Files
@@ -74,7 +75,6 @@ public ProHome()
7475
RefreshButton = Refresh;
7576
AddItemButton = AddItem;
7677
LocationsList.SelectedIndex = 0;
77-
accessibleContentFrame.Navigate(typeof(YourHome));
7878
if (App.Current.RequestedTheme == ApplicationTheme.Dark)
7979
{
8080
titleBar.ButtonBackgroundColor = Color.FromArgb(255, 0, 0, 0);
@@ -102,6 +102,7 @@ public ProHome()
102102
titleBar.ButtonHoverBackgroundColor = Color.FromArgb(75, 240, 240, 240);
103103
titleBar.BackgroundColor = Colors.White;
104104
}
105+
accessibleContentFrame.Navigate(typeof(YourHome), new SuppressNavigationTransitionInfo());
105106
RibbonTeachingTip = RibbonTip;
106107
ProHome.RibbonTeachingTip.IsOpen = false;
107108
PopulateNavViewWithExternalDrives();

0 commit comments

Comments
 (0)