This is the WPF Window Class:
public partial class MainWindow : Window
{
public Bitmap image;
public CaptureModel cm = CaptureModel.Instance;
public MainWindow()
{
InitializeComponent();
image = cm.Image;
DataContext = this.image;
CaptureModel.Instance.PropertyChanged += new PropertyChangedEventHandler(Instance_PropertyChanged);
}
void Instance_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "ImageChanged")
{
this.image = cm.Image;
}
}
}
}
And this is the .xaml for it:
<Window x:Class="TestApplication.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/prese
View Complete Post