If you want to contribute to the forum discussions, please Register or Login.
Hi, it's me again and I'm having just another problem :<
How can I get object I have added to DropDownButton? I closest method I have found is Items.ElementAt but it requires generic System.Collections.Generic.IEnumerable. I tried to solve this but I didn't get it. Why I just cant get the string object I have added to my DropDownButton list?
If you have added strings to the DropDownButton, you can get the selected string like this:
var selectedString = (string)myDropDownButton.Items[myDropDownButton.SelectedIndex];
Is this what you are looking for?
Ah yes. I didn't realise it's possible to get items with the square brackets. Thanks :)
By the way is there any difference between string selectedString and var selectedString?
DigitalRune is a trademark of Garstenauer Information Technology OG.
Garstenauer Information Technology OG Weingartenstrasse 35, 4452 Ternberg Austria (EUROPE) office@digitalrune.com