Sketchflow Navigation
I am new to Blend & Sketchflow. I hope someone can help me.
I have been doing a sketchflow project and have set up several buttons that navigate to specific screens (nice and easy).
Now the catch...
I have made a generic menu at the top, and have put a button on it, and what I want to achieve with it is that if someone clicks on that button, instead of navigating to a specific screen, it simply navigates to the previous screen that was viewed in sketchflow.
Does anyone know if this is possible? And if so,开发者_如何学JAVA how I would achieve this?
Use the "back" behavior. There are 2 easy ways to apply this behavior to your button:
- Right click the button in the artboard, select "Navigate To" -> "Back" or
- Open the assets panel, SketchFlow->Behaviors->NavigateBackAction, drag this behavior onto your button.
The xaml should look similar to this:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:pb="clr-namespace:Microsoft.Expression.Prototyping.Behavior;assembly=Microsoft.Expression.Prototyping.Interactivity"
x:Class="SilverlightPrototype12Screens.Screen_1"
Width="640" Height="480">
<Grid x:Name="LayoutRoot" Background="White">
<Button Height="66" Margin="241,68,275,0" VerticalAlignment="Top" Content="Button">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<pb:NavigateBackAction/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</Grid>
I was looking for the same question, but I want to navigate from c#.net.
I found the following solution:
private void Navigate(object sender, RoutedEventArgs e)
{
Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.NavigateToScreen("WpfPrototype2Screens.Screen_2", true);
}
in this forum.
精彩评论