void PlayWithCooperatingLibrary() { var coopViewModel = new CoopViewModel(); var proxyFactory = new ProxyFactory(); var proxy = proxyFactory.CreateProxy<CoopViewModel>(new ViewModelInvokeWrapper<CoopViewModel>(coopViewModel), typeof(IViewModel)); // When using coopViewModel directly, the bindings are updated correctly, when using the proxy the binding update breaks var view = new CoopView(coopViewModel /* proxy */); var win = new Window { Topmost = true, Content = view, SizeToContent = SizeToContent.WidthAndHeight }; win.Show(); }
public CoopView(CoopViewModel coopViewModel) : this() { DataContext = _viewModel = coopViewModel; _viewModel.InitializeCommand(); }