container.RegisterType<object, LabStatusView>("LabStatusView");
Uri LabStatusViewUri = new Uri("pack://application:,,,/LabStatus;component/LabStatusView.xaml",
UriKind.Absolute);
regionManager.RequestNavigate("HorizonNavigatorView",LabStatusViewUri,NavigationCompleted);
I am using this to navigate to LabStatusView, which seems straightforward.
ObjectStates after the requestNavigate is executed:
Any suggestion what i am doing wrong here ?
To Navigate is alot easier to do than in your code. Here's how i did it for a project.
//Register your View on Startup
container.RegisterType<object, LabStatusView>("LabStatusView");
//Navigation works like this
var labStatusView = new Uri("LabStatusView", UriKind.Relative);
regionManager.RequestNavigate("HorizonNavigatorView", labStatusView);
Can you try it like this?
Also many people use static classes for their Region and View name to avoid "magic strings". Something like this.
public class RegionNames
{
public const string HorizonNavigatorView = "HorizonNavigatorView";
}
public class ViewNames
{
public const string LabStatusView = "LabStatusView";
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With