代码之家  ›  专栏  ›  技术社区  ›  Mark Pearl

草图流导航

  •  7
  • Mark Pearl  · 技术社区  · 16 年前

    我是新的混合&草图流。我希望有人能帮助我。

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

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

    2 回复  |  直到 16 年前
        1
  •  8
  •   Chuck Hays    16 年前

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

    1. 右键单击艺术板中的按钮,选择“导航到”->“回来” 或
    2. 打开“资源”面板,SketchFlow->行为->NavigateBackAction,将此行为拖到按钮上。

    <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
  •  6
  •   Tobi    16 年前

    我找到了以下解决方案:

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

    在这个 forum

    推荐文章