如何从现有组合框中选择项目时显示另一个组合框。 [英] How to Display the another combo Box when Item is selected from the existing combo box.

查看:68
本文介绍了如何从现有组合框中选择项目时显示另一个组合框。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个只包含一个带有名称列表的组合框的视图。如果我从组合框中选择一个名称,选择后更改视图应该自动插入带有其他名称的新组合框,这应该重复到最后组合框只包含一个名称。

例如:string [] names = {first,second,third};

现在在我看来我有一个组合框,项目作为名称。如果我选​​择第一,那么另一个组合框应该出现在视图中,项目为第二和第三....

I have a view which contains only one combo Box with a list of name.If i select one name from the combo box,after selection changed the view should automatically insert new combo box with the other names and this should repeat until last combo-box contains only one name .
eg: string[] names={"first","second","third"};
now in my view i have one combo-box with items as names.If i select "first",then a another combo-box should appear in view with items as "second" and "third"....

推荐答案





下面是一些文章的链接,这些文章将讨论如何在WPF中动态添加组合框。

在WPF中动态创建TextBox和Combobox [ ^ ]

如何动态创建WPF中的ComboBox [ ^ ]

单击vb(wpf)中的按钮动态创建ComboBox [ ^ ]



使用上述概念创建控件并在选择相应控件的更改事件。



希望它有所帮助。
Hi,

below are links to some articles which will talk about adding combobox dynamically in WPF.
Dynamically Create TextBox And Combobox in WPF[^]
How to create a ComboBox in WPF Dynamically[^]
Dynamically create ComboBox on click of button in vb (wpf)[^]

use the above concepts to create the controls and use it on the selected changed events of the respective controls.

hope it helps.


这篇关于如何从现有组合框中选择项目时显示另一个组合框。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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