[英]Reset Combo-box C# WP 8.1
my problem is that i don't know how to reset a combo-box to it's default value choose an item
, after clicking a button. 我的问题是我不知道如何将组合框重置为其默认值,然后单击按钮
choose an item
。 I only found the following code, but it erases all the items of tha combo-box which is not what i want! 我只找到以下代码,但是它删除了组合框的所有项目,这不是我想要的!
myCombo1.Items.Clear();
myCombo1.Items.Clear();
Also, is it possible to create an instance of MainPage
and use it in navigation function? 另外,是否可以创建
MainPage
实例并将其用于导航功能?
Frame.Navigate(typeof(MainPage));
Frame.Navigate(typeof运算(的MainPage));
这应该可以解决问题:
myCombo1.SelectedIndex = -1;
Use simplly clear() method : 使用简单的clear()方法:
ComboBoxName.Clear();
. 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.