Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: (very) Basic Databinding question

$
0
0
Actually, I just realised why you are getting this error. The reason is because you are attempting to bind statically to the Application.Current which will be App.xaml/.cs not MainWindow.xaml/cs.

You have a choice between
  1. Change the static binding to be for your MainWindow. The simpliest way to do that would be to remove the static of the readonly auto property and then simply using a {Binding FactorSet} after setting the datacontext to the mainwindow. If you are using a different datacontext as the default context, you will have to then use ElementName and reference the window by name.
  2. Reference Application.Current.MainWindow assuming that your MainWindow is the first and main window of the application.

Viewing all articles
Browse latest Browse all 2157

Trending Articles