private void RestoreOverview() { if (DrawModel.OverviewData is IDrawData) { DrawModel.OverviewIsVisible = _overviewIsVisible = true; OverviewBorder.Visibility = Visibility.Visible; OverviewOnOffTextBlock.Text = "\uF0AD"; OverviewBorder.Visibility = Visibility.Visible; OverviewResize.Visibility = DrawModel.Picker1Data is null ? Visibility.Visible : Visibility.Collapsed; OverCanvas.IsEnabled = true; //enable CanvasDraw SetScaleOffset(OverCanvas, DrawModel.OverviewData); OverCanvas.Invalidate(); } else { HideOverview(); } }
private void ResizingOverview() { var size = Vector2.Abs(GridPoint1 - GridPoint2); if (size.X < OverviewBorder.MinWidth) { return; } if (size.Y < OverviewBorder.MinHeight) { return; } OverviewBorder.Width = size.X; OverviewBorder.Height = size.Y; SetScaleOffset(OverCanvas, DrawModel.EditData); OverCanvas.Invalidate(); }
private void SetNewColor(Color color) { _pickerColor = color; SetSampleColor(color); DrawModel.ColorARGB = (color.A, color.R, color.G, color.B); //triggers a DrawModel data update if (EditCanvas.IsEnabled) { EditCanvas.Invalidate(); } if (OverCanvas.IsEnabled) { OverCanvas.Invalidate(); } if (Pick1Canvas.IsEnabled) { Pick1Canvas.Invalidate(); } if (Pick2Canvas.IsEnabled) { Pick2Canvas.Invalidate(); } }