Sketchflow Navigation

戏子无情 提交于 2019-12-03 13:49:41

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>

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.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!