diff --git a/Bind_combobox_column_ItemsSource_from_view_model.png b/Bind_combobox_column_ItemsSource_from_view_model.png new file mode 100644 index 0000000..96dd0e2 Binary files /dev/null and b/Bind_combobox_column_ItemsSource_from_view_model.png differ diff --git a/README.md b/README.md index 6c73cc8..06391cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,28 @@ -# how-to-bind-combobox-column-ItemsSource-from-view-model-in-wpf-and-uwp-treegrid-in-mvvm +# How to Bind Column ItemsSource from ViewModel in WPF / UWP TreeGrid in MVVM? -This example illustrates to bind the ComboBox column ItemsSource using MVVM. \ No newline at end of file +This example illustrates how to bind the ComboBox column's **ItemsSource** using MVVM in [WPF TreeGrid](https://www.syncfusion.com/wpf-controls/treegrid) / [UWP TreeGrid](https://www.syncfusion.com/uwp-ui-controls/treegrid) (SfTreeGrid). + +You can bind the **ItemsSource** from ViewModel to [TreeGridComboBoxColumn](https://help.syncfusion.com/cr/wpf/Syncfusion.UI.Xaml.TreeGrid.TreeGridComboBoxColumn.html) or using **ElementName** binding. + +### XAML: + +``` xml + +``` + +### C# ViewModel: +``` c# +private ObservableCollection titleList; + +public ObservableCollection TitleList +{ + get { return titleList; } + set { titleList = value; } +} +``` + +![How to Bind Column ItemsSource from ViewModel in WPF / UWP TreeGrid in MVVM](Bind_combobox_column_ItemsSource_from_view_model.png)