private void RaisePropertyChangedEvent(DependencyPropertyChangedEventArgs e) { if (PropertyChanged != null) { RaisePropertyChanged(ExtendedPropertyChangedEventArgs.FromDependencyPropertyChanged(e)); } }
private void OnViewportPropertyChanged(object sender, ExtendedPropertyChangedEventArgs e) { if (e.PropertyName == "Visible" || e.PropertyName == "Output") { UpdateScrollBar((Viewport2D)sender); } }
private void viewport_PropertyChanged(object sender, ExtendedPropertyChangedEventArgs e) { notMineEvent = true; try { RaisePropertyChanged(e); } finally { notMineEvent = false; } }
//private DispatcherOperation pendingRaisePropertyChangedOperation; //private bool inRaisePropertyChanged = false; protected virtual void RaisePropertyChanged(ExtendedPropertyChangedEventArgs args) { //if (inRaisePropertyChanged) //{ // if (pendingRaisePropertyChangedOperation != null) // pendingRaisePropertyChangedOperation.Abort(); // pendingRaisePropertyChangedOperation = Dispatcher.BeginInvoke(() => RaisePropertyChanged(args), DispatcherPriority.Normal); // return; //} //pendingRaisePropertyChangedOperation = null; //inRaisePropertyChanged = true; PropertyChanged.Raise(this, args); //inRaisePropertyChanged = false; }
private void OnViewportPropertyChanged(object sender, ExtendedPropertyChangedEventArgs e) { if (e.PropertyName == "Visible") { OnVisibleChanged((DataRect)e.NewValue, (DataRect)e.OldValue); } else if (e.PropertyName == "Output") { OnOutputChanged((Rect)e.NewValue, (Rect)e.OldValue); } else if (e.PropertyName == "Transform") { Update(); } else { // other properties changed are now not interesting for us } }
protected override void RaisePropertyChanged(ExtendedPropertyChangedEventArgs args) { if (args.PropertyName == "Visible") { if (notMineEvent) { if (viewport.PanningState == Viewport2DPanningState.NotPanning) { base.RaisePropertyChanged(args); } else { // do nothing } } } else { base.RaisePropertyChanged(args); } }
protected override void OnViewportPropertyChanged(DynamicDataDisplay.ExtendedPropertyChangedEventArgs e) { InvalidateVisual(); }