public FakePasteView(IPasteViewModel vm) { _vm = (PasteViewModel)vm; _closing = Observable.FromEventPattern <PropertyChangedEventArgs>(vm, "PropertyChanged") .Where(_ => _vm.IsFinished).Select(_ => Unit.Default); DataContext = vm; }
public PasteView(IPasteViewModel vm) : this() { DataContext = vm; var binding = new Binding("IsUploading") { Mode = BindingMode.OneWay, Source = vm }; SetBinding(IsUploadingProperty, binding); binding = new Binding("IsFinished"){Mode = BindingMode.OneWay, Source=vm}; SetBinding(IsFinishedProperty, binding); progressBar.ValueChanged += ProgressBarOnValueChanged; }
public PasteView(IPasteViewModel vm) : this() { DataContext = vm; var binding = new Binding("IsUploading") { Mode = BindingMode.OneWay, Source = vm }; SetBinding(IsUploadingProperty, binding); binding = new Binding("IsFinished") { Mode = BindingMode.OneWay, Source = vm }; SetBinding(IsFinishedProperty, binding); progressBar.ValueChanged += ProgressBarOnValueChanged; }