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
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".
Thanks
title = CType(Comboyears.Items(Comboyears.SelectedIndex), ComboBoxItem).Content.ToString
8 people are following this question.
How to write and read multiple types of data using Data Writer and Data Reader
Consuming UWP mail api from WPF Desktop Bridge App
Get Network usage information in UWP apps
How to Get/Set Cookies in Windows.Web.Http API
Switch the ListView Datatemplate from one data template to another data template?