【问题标题】:Sketchflow Navigation草图流导航
【发布时间】:2010-06-23 22:08:56
【问题描述】:

我是 Blend 和 Sketchflow 的新手。我希望有人可以帮助我。

我一直在做一个sketchflow项目,并设置了几个导航到特定屏幕的按钮(很好也很简单)。

现在抓到了...

我在顶部做了一个通用菜单,并在上面放了一个按钮,我想用它实现的是,如果有人点击该按钮,而不是导航到特定屏幕,它只是导航到在草图流中查看的上一个屏幕。

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

【问题讨论】:

    标签: sketchflow


    【解决方案1】:

    使用“后退”行为。有两种简单的方法可以将此行为应用到您的按钮:

    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>
    

    【讨论】:

    • 谢谢...我觉得自己像个真正的菜鸟
    【解决方案2】:

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

    我找到了以下解决方案:

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

    在这个forum.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-01-22
      • 2020-07-18
      • 1970-01-01
      • 1970-01-01
      • 2018-02-26
      • 2017-11-18
      相关资源
      最近更新 更多