Sketchflow Navigation
Asked Answered
H

2

7

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, how I would achieve this?

Heterosexual answered 21/1, 2010 at 13:57 Comment(0)
L
8

Use the "back" behavior. There are 2 easy ways to apply this behavior to your button:

  1. Right click the button in the artboard, select "Navigate To" -> "Back" or
  2. 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>

Lingua answered 21/1, 2010 at 15:40 Comment(1)
Thank you... I feel like a real noobHeterosexual
E
6

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.

Extravagate answered 23/6, 2010 at 14:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.