question

stevefred-5067 avatar image
0 Votes"
stevefred-5067 asked HuiLiu-MSFT edited

PRISM Navigation at start up fails

I am not sure this where to ask this question
I am using PRISM 8.0 cire
At startup I try to navigate to a view to a region and it fails.
I the navigation right after the InitializeComponent method

 public partial class MainWindow : ThemedWindow
 {
     public MainWindow()
     {
         InitializeComponent();
         var mv = DataContext as MainWindowViewModel;
         mv.NavigateToToolbar();
         ;
     }

public void NavigateToToolbar()
{
_regionManager.RequestNavigate(RegionNames.NavigationBarRegion, "ToolbarWindow", NavigationCompleted);
}

     private void NavigationCompleted(NavigationResult result)
     {
         var a = 1;
     }

Can anyone tell me why this would fail?
The ToolbarWindow is registered for navigation with the container


windows-wpf
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

For third-party Prism questions, please refer to the contact information on the owner's website. Prism lists their support options on their GitHub Repo at https://github.com/PrismLibrary/Prism :

For general questions and support, post your questions on StackOverflow.


0 Votes 0 ·

0 Answers