我在wp7 app里面的ListBox中有一个ListBox.ItemTemplate。我想要的是当用户在querystring中使用titletext点击标题时导航到某个页面。
目前它只是导航到某个页面。
<ListBox x:Name="lbname" >
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<TextBlock x:Name="tbTitle" Grid.Row="0" Text="{Binding Title}" TextAlignment="Left" FontFamily="Segoe WP" Foreground="#000000" Style="{StaticResource PhoneTextTitle1Style}" >
<Custom:Interaction.Triggers>
<Custom:EventTrigger EventName="MouseLeftButtonDown">
<ic:NavigateToPageAction TargetPage="/Views/somePage.xaml"/>
</Custom:EventTrigger>
</Custom:Interaction.Triggers>
</TextBlock>
<TextBlock x:Name="tbDesc" Grid.Row="1" Margin="11,0,0,0" Text="{Binding Desc}" TextAlignment="Left" FontFamily="Segoe WP" Foreground="#000000" TextWrapping="Wrap" Style="{StaticResource PhoneTextSubtleStyle}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
怎么做?
答案 0 :(得分:0)
如何设置TargetPage =“{Binding Address}”?
答案 1 :(得分:0)
我将HyperlinkButton
用于NavigateUri="{Binding NavigationURL}"