Hello all,
I have a XAML for a WPF window, in a framework that's based of Entity. I have a property of the MainWindow class that is
public Asset CurrentAsset;
which is supposed to reference an "environment" ie the source of most bindings in the XAML. I am trying to bind to CurrentAsset but that doesn't seem to work. I have tried replacing by a DependencyProperty but that crashes my build when I start the application
public Asset CurrentAsset
{
get { return (Asset)GetValue(_CurrentAsset); }
set { SetValue(_CurrentAsset, value); }
}
public static readonly DependencyProperty _CurrentAsset =
DependencyProperty.Register("CurrentAsset", typeof(Asset), typeof(MainWindow), new FrameworkPropertyMetadata(false));
I have had success in creating CollectionViewSources and declaring them in <Window.Resources> then using them in the bindings, I was hoping to do something similar for this property but can't find a way to do it
A little help please ? I have been searching everywhere
Thanks in advance