Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sketchflow Navigation

Tags:

sketchflow

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?

like image 595
Mark Pearl Avatar asked Jan 21 '10 13:01

Mark Pearl


2 Answers

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>

like image 82
Chuck Hays Avatar answered Sep 18 '22 18:09

Chuck Hays


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.

like image 25
Tobi Avatar answered Sep 19 '22 18:09

Tobi