我是新來混合& Sketchflow。我希望有一個人可以幫助我。素描流程導航
我一直在做一個sketchflow項目,並設置了幾個按鈕導航到特定的屏幕(很好很容易)。
現在抓......
我已在頂部有一個通用的菜單,並把按鈕就可以了,我要實現它是什麼,如果有人點擊該按鈕,而不是導航到特定屏幕時,它只是導航到素描流中查看的上一個屏幕。
有誰知道這是可能的嗎?如果是這樣,我將如何實現這一目標?
我是新來混合& Sketchflow。我希望有一個人可以幫助我。素描流程導航
我一直在做一個sketchflow項目,並設置了幾個按鈕導航到特定的屏幕(很好很容易)。
現在抓......
我已在頂部有一個通用的菜單,並把按鈕就可以了,我要實現它是什麼,如果有人點擊該按鈕,而不是導航到特定屏幕時,它只是導航到素描流中查看的上一個屏幕。
有誰知道這是可能的嗎?如果是這樣,我將如何實現這一目標?
使用「後退」行爲。有2層簡單的方法來應用此行爲您的按鈕:
的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>
我一直在尋找同樣的問題,但我想從C#.NET進行導航。
我發現了以下解決方案:
private void Navigate(object sender, RoutedEventArgs e)
{
Microsoft.Expression.Prototyping.Services.PlayerContext.Instance.ActiveNavigationViewModel.NavigateToScreen("WpfPrototype2Screens.Screen_2", true);
}
在這個forum。
謝謝......我覺得自己像一個真正的noob –