Hoping this will be a simple one, in Sketchflow i'm trying to wire up a context menu to navigate to another page.
I've created the context menu, added a menu item, right clicked the mneu item in the Objects and Timeline panel and selected navigateto. When i run it, the menu comes up but when i click on the menu item it doesn't do anything.
I previously had the NavigateTo working when left clicking on another object, so the screens / connections are all in place.
This is the xaml that was generated:
<ContextMenu>
<MenuItem Header="Edit">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseDown">
<pb:NavigateToScreenAction TargetScreen="SomeScreen.Screen开发者_JAVA技巧_3_2"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
</ContextMenu>
This xaml works for the scenario I think you are trying to achieve:
<Button Content="Button">
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="Next">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<pb:NavigateToScreenAction TargetScreen="WpfPrototype3Screens.Screen_2"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</MenuItem>
</ContextMenu>
</Button.ContextMenu>
</Button>
As long as the path for the TargetScreen is correct, just change the EventName to "Click" and it will work. "Click" handles the "MouseDown" event.
精彩评论