private static void OnVerticalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MapTip dp = d as MapTip; int dY = (int)e.NewValue - (int)e.OldValue; dp.SetValue(Canvas.TopProperty, Canvas.GetTop(dp) + dY); }
private static void OnHorizontalOffsetPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { MapTip dp = d as MapTip; int dX = (int)e.NewValue - (int)e.OldValue; dp.SetValue(Canvas.LeftProperty, Canvas.GetLeft(dp) + dX); }