10 Replies
Hi,
the only way is to convert it to a string.
is databinding actually what you want here
yes that was a example
i have a textbox but i want to add a databind to a instance of a custom class
look into
BindingSource
why does datasource no require a object to be a string while databinds in this case does
I've no idea what you mean, can you post your current code
loook at: https://learn.microsoft.com/en-us/dotnet/desktop/wpf/data/?view=netdesktop-7.0
and startPrice complete explenation
Data binding overview - WPF .NET
Learn about the different data sources you can add to your project in Windows Presentation Foundation for .NET. Data sources can be bound to XAML elements to create dynamic apps.
Cannot bind to property 'Items' because it is read-only.
comboBoxSomething.DataBindings.Add(...);
try setting the
DataSource
?yes
does it automatically set the var as the selected item
or do i manually have to do
myVar = comboBox1.SelectedItem