标签:io os ar 使用 for sp div on cti
首先要加上两个命名空间
分别为:
- xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
- xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
然后
- <Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="170,239,0,0" Grid.Row="1">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <ec:NavigateToPageAction TargetPage="/Page1.xaml"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
<Button Content="Button" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="170,239,0,0" Grid.Row="1">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ec:NavigateToPageAction TargetPage="/Page1.xaml"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
使用NavigateToPageAction还可以传递查询字符串:
我们可以用NavigationContext.QueryString,把查询字符串读出来
-
-
- <ListBox>
- ...
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <ec:NavigateToPageAction>
- <ec:NavigateToPageAction.TargetPage>
- <Binding Path="SelectedIndex" ElementName="MainListBox"
- StringFormat="/DetailsPage.xaml?selectedItem={0}"/>
- </ec:NavigateToPageAction.TargetPage>
- </ec:NavigateToPageAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ListBox>
NavigateToPageAction打开新页面
标签:io os ar 使用 for sp div on cti
原文地址:http://www.cnblogs.com/zgqys1980/p/4035480.html