We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When Region value is a substring of Page name, browser refresh will skip main page. ヽ(ຈل͜ຈ)ノ︵ ┻━┻
Working fine after refresh
Not working if Region value same as Page name
<Page x:Class="UnoAppNavigation2.Presentation.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="using:UnoAppNavigation2" xmlns:Presentation="using:UnoAppNavigation2.Presentation" xmlns:uen="using:Uno.Extensions.Navigation.UI" xmlns:utu="using:Uno.Toolkit.UI" Loaded="Page_Loaded" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Page.Resources> <x:String x:Key="PageOne">aFirstPage</x:String><!--magic: change it to aFirstPage or FirstPagea and it will work--> <x:String x:Key="PageTwo">PageTwo</x:String> </Page.Resources> <Grid uen:Region.Attached="True" RowDefinitions="auto,*"> <StackPanel Grid.Row="0" HorizontalAlignment="Left" Orientation="Horizontal" Background="DarkSlateGray"> <TextBlock> <Run Text="URL:"/> <Run x:Name="UrlPath"/> </TextBlock> </StackPanel> <NavigationView Grid.Row="1" uen:Region.Attached="true" PaneDisplayMode="Top" IsSettingsVisible="False" ItemInvoked="NavigationView_ItemInvoked" IsBackButtonVisible="Collapsed" IsBackEnabled="False"> <NavigationView.MenuItems> <NavigationViewItem Content="One" x:Name="OneTab" IsSelected="True" uen:Region.Name="{StaticResource PageOne}" /> <NavigationViewItem Content="Two" x:Name="TwoTab" uen:Region.Name="{StaticResource PageTwo}" /> </NavigationView.MenuItems> <Grid uen:Region.Attached="True" uen:Region.Navigator="Visibility"> <Presentation:FirstPage Visibility="Collapsed" uen:Region.Name="{StaticResource PageOne}"/> <Presentation:SecondPage Visibility="Collapsed" uen:Region.Name="{StaticResource PageTwo}"/> </Grid> </NavigationView> </Grid> </Page>
public sealed partial class MainPage : Page { private App? _app; public MainViewModel? ViewModel { get; set; } public MainPage() { _app = (Application.Current as App); INavigator navigator = this.Navigator(); this.InitializeComponent(); UrlPath.Text = _app?.MainHref + " base url:"+_app.BaseUrl; } private void NavigationView_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) { Console.WriteLine($"==== Navigation invoked ====="); } private async void Page_Loaded(object sender, RoutedEventArgs e) { var navigator = this.Navigator(); Console.WriteLine($"==== Main Page Loaded href = {_app.MainHref} ====="); if(_app?.MainHref is not null) { Console.WriteLine($"==== Navigation to {_app.MainHref} ======="); var result = await navigator.NavigateRouteAsync(this, _app.MainHref); } } }
ummm it just should work regardless of what value the Region has ?
Nuget Package (s):
Package Version(s):
Affected platform(s):
Visual Studio:
Relevant plugins:
UnoAppNavigation2.zip
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current behavior
When Region value is a substring of Page name, browser refresh will skip main page.
ヽ(ຈل͜ຈ)ノ︵ ┻━┻
Working fine after refresh
Not working if Region value same as Page name
Expected behavior
ummm it just should work regardless of what value the Region has ?
How to reproduce it (as minimally and precisely as possible)
Environment
Nuget Package (s):
Package Version(s):
Affected platform(s):
Visual Studio:
Relevant plugins:
UnoAppNavigation2.zip
Anything else we need to know?
The text was updated successfully, but these errors were encountered: