Silverlight DataBinding Error - Works in WPF. Though!
Start a new Silverlight application ... and in the code behind (in the "Loaded" event) enter this code:
// This will *NOT* cause an error.
this.LayoutRoot.DataContext = new string[5];
But...
// This *WILL* cause an error!
this.LayoutRoot.DataContext = this;
The resulting error is "The value is not in the expected range." BTW, this code works 100% in regular WPF (Windows development) and there should be no reason why it won't work in WPF / E :)
Any thoughts?
0
source to share