示例#1
0
 public FakePasteView(IPasteViewModel vm)
 {
     _vm      = (PasteViewModel)vm;
     _closing = Observable.FromEventPattern <PropertyChangedEventArgs>(vm, "PropertyChanged")
                .Where(_ => _vm.IsFinished).Select(_ => Unit.Default);
     DataContext = vm;
 }
示例#2
0
        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;
        }
示例#3
0
        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;
        }