I have inherited a Sketchflow-prototyped WPF application. I am in the process of adding functionality to the UI.
As it currently is, navigation from screen to screen is defined in XAML as an event as follows:
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<pi:NavigateToScreenAction TargetScreen="WpfPrototype1Screens.Screen_1_2"/>
</i:EventTrigger>
</i:Interaction.Triggers>
This works, but the problem is that it doesn't allow me to validate user input before navigating to the new screen.
What I would like to know, is how can I programmatically navigate to the new screen from within the button's click event handler in C#?
For instance:
private void Button1_Click_1(object sender, RoutedEventArgs e)
{
if (userInputValid)
{
NavigateToScreen_1_2();
}
}