private static void Initialize(ImageControl control) { var eraserCache = GetEraserCache(control) ?? new EraserCache(); var cursor = GetCursor(control) ?? eraserCache.Cursor; control.EnsureTransforms(); eraserCache.Scale = (control.RenderTransform as TransformGroup).Children.GetScale(); cursor.IsHitTestVisible = false; cursor.Visibility = Visibility.Collapsed; eraserCache.Cursor = cursor; SetEraserCache(control, eraserCache); }