Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows desktop devices.
2,832 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
I get this error when i try to assign the content of a combobox item to a string
comboyear is a combobox
dim title as string
title = comboyear.items(comboyear.SelectedIndex).content
Thanks
Hi, comboyear.items(comboyear.SelectedIndex) gets you an object. Object hasn't property content. You should cast comboyear.items(comboyear.SelectedIndex) to typ of item. If you bind ItemsSource to List(Of Data) you must cast to Data like this:
dim title as string
title = ctype(comboyear.items(comboyear.SelectedIndex), Data).content
In this case your class Data must have property "content".