I am trying to populate a combobox using an ObservableList or a List object that I get from a method call (GetYears).
The ObjectDataProvider looked promising, but when I try to use it, I get "x: the key is only allowed for resources and dictionary items" and has difficulty in where I have to put it in my xaml.
I am currently doing the same thing using the following snippet, but I find it against the best practices of WPF and more of WinForms.
public partial class MainWindow : Window
{
public MainWindow()
{
YearComboBox.ItemsSource = GetYears();
}...
I view the following pages
http://msdn.microsoft.com/en-us/library/aa480224.aspx and this page http://www.codeproject.com/Articles/140621/WPF-Tutorial-Concept-Binding
and reading speed of the next book "Pro WPF in C # 2010 "
Android/c/++ - .Net/WPF WPF. MVVM, , ; , . MVVM.sln? , UML- MVVM? , , .
user1741874