private static void OnOffsetChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) { DraggedElementAdorner adorner = sender as DraggedElementAdorner; if (adorner == null) { return; } adorner.UpdatePosition(); }