WPF MVVM UserControl DataBinding in XAML Not Working?

Make sure you defined the DataSource property of your ChapterStack control as a Dependency Property because otherwise, you won't be able to bind it.

Make sure you defined the DataSource property of your ChapterStack control as a Dependency Property, because otherwise, you won't be able to bind it.

Yep, public static readonly DependencyProperty DataSourceProperty – mike Apr 23 at 19:49 also, public ObservableCollection DataSource { get { return (ObservableCollection)GetValue(DataSourceProperty); } set { SetValue(DataSourceProperty, value); } } – mike Apr 23 at 19:52 try debuggin the binding by adding an dummy converter and setting a break point inside it. That'll let you know what are you getting as a value. This might help – AbdouMoumen Apr 23 at 20:03 @ AbdouMoumen, found it.

I was setting DataSource = new ObservableCollection on the controls OnInitialized event. – mike Apr 23 at 20:29 1 @mike, if you found the solution, you should answer your own question. – svick Apr 23 at 21:04.

But trying to bind via ht xaml doesn't work If you cannot tell any more than that then the first thing you should learn is how to find out why it does not work.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions