Is the full DataContext concept implemented, I am attempting to create a test app that displays the DateTime but using the MVVM design pattern. But the string is never displayed on the screen.
I created a class called ViewModel, it has a public property called DateAndTime. I am initializing the property on the constructor of this class. For simplicity, I am not inheriting from INotifyPropertyChanged yet. But I will.
Then in the MainPage.xaml.cs in the constructor after the InitializeComponent() call I create a new instance of ViewModel then assign it to this.DataContext. My Binding in XAML looks like this: <TextBlock Text="{Binding Path=DateAndTime}" x:Name="TextBlock1" />
I put a breakpoint on the public getter of my ViewModel.DateAndTime property, but it never gets hit.
Any ideas?
This concept works fine in "normal" full blown WPF.