简体   繁体   中英

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. 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();

Also, is it possible to create an instance of MainPage and use it in navigation function?

Frame.Navigate(typeof(MainPage));

这应该可以解决问题:

myCombo1.SelectedIndex = -1;

Use simplly clear() method :
ComboBoxName.Clear(); .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM