使用Blend更改选定项目时,导航到另一页面 [英] Make navigation to another page when selected item changed with Blend

查看:69
本文介绍了使用Blend更改选定项目时,导航到另一页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在列表框的选定项目之间创建绑定,可以将该项目发送到具有Blend的另一个页面?



以下是一些代码:

How can I create a binding between a selected item of a list box that can send that item to another page with Blend?

Here is some code:

<ListBox Grid.Row="2" Grid.Column="0"  Grid.ColumnSpan="3"

         ItemContainerStyle="{StaticResource lstidflt}" 

         SelectedItem="{Binding SelectedVillage, Mode=TwoWay}"

         ItemTemplate="{StaticResource weatheritemdt}" 

         ItemsSource="{Binding VillageList}" />



因此,该列表框的选定项目已更改,我必须重定向到另一个页面。我怎么能做那个Whit Blend?



结果一定是看起来像这样

推荐答案

我找到了它。我必须从Nuget安装'behavior'包,然后将它拖放到我需要使用它的元素上。 见图。
I've found it. I must install the 'behaviors' package from Nuget and than drag and drop it onto the element I need to use it. See image here.


这篇关于使用Blend更改选定项目时,导航到另一页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆