Skip to content

Commit

Permalink
Merge pull request #1342 from unoplatform/dev/nr/flyoutfix
Browse files Browse the repository at this point in the history
fix: Correct flyout behaviour with navigation
  • Loading branch information
nickrandolph authored Mar 30, 2023
2 parents d64f0f1 + 0320e5d commit 68b1506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:uen="using:Uno.Extensions.Navigation.UI"
Placement="Full"
FlyoutPresenterStyle="{StaticResource MaterialFlyoutPresenterStyle}">
Placement="Full">

<Grid>
<Frame uen:Region.Attached="True"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ public static IServiceCollection AddNavigation(
var routes = createRouteRegistry?.Invoke(services) ?? new RouteRegistry(services);
routeBuilder?.Invoke(views, routes);

// Only fall back to the navigation flyout if one hasn't already been registered
services.AddTransient<Flyout, NavigationFlyout>();

return services
.AddSingleton<NavigationConfig>(sp =>
{
Expand All @@ -41,7 +44,6 @@ public static IServiceCollection AddNavigation(
.AddHostedService<BrowserAddressBarService>()
.AddScoped<Navigator>()

.AddTransient<Flyout, NavigationFlyout>()

// Register the region for each control type
.AddRegion<Frame, FrameNavigator>()
Expand Down

0 comments on commit 68b1506

Please sign in to comment.