Sketchflow导航

Mar*_*arl 7 sketchflow

我是Blend&Sketchflow的新手.我希望有一个人可以帮助我.

我一直在做一个Sketchflow项目,并设置了几个导航到特定屏幕的按钮(简单易用).

抓住......

我在顶部制作了一个通用菜单,并在其上放了一个按钮,我想要实现的是,如果有人点击该按钮,而不是导航到特定屏幕,它只需导航到上一个屏幕在sketchflow中查看过.

有谁知道这是否可能?如果是这样,我将如何实现这一目标?

小智 8

使用"后退"行为.有两种简单的方法可以将此行为应用于您的按钮:

  1. 右键单击画板中的按钮,选择"导航到" - >"返回"或
  2. 打开资源面板SketchFlow-> Behaviors-> NavigateBackAction,将此行为拖到按钮上.

xaml看起来应该类似于:

<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>
Run Code Online (Sandbox Code Playgroud)


Tob*_*obi 6

我正在寻找同样的问题,但我想从c#.net导航.

我找到了以下解决方案:

private void Navigate(object sender, RoutedEventArgs e)
{
   Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.NavigateToScreen("WpfPrototype2Screens.Screen_2", true);
}
Run Code Online (Sandbox Code Playgroud)

在这个论坛上.