private void LoadWorkspace() { _workspace = new UserControl { Content = new Workspace(this, AreaWidth, AreaHeight) }; DrawningFraemworkElements.Add(_workspace); _workspace.PreviewDrop += Workspace_PreviewDrop; Canvas.SetZIndex(_workspace, -20); }
//C ГРИДОМ РАЗОБРАТЬСЯ!!!! public void ReorganizeGrid(bool isShowGrid) { _isShowGrid = isShowGrid; while (DrawningFraemworkElements.Any(x => x.GetType() == typeof(CoorGrid))) { DrawningFraemworkElements.Remove(DrawningFraemworkElements.First(x => x.GetType() == typeof(CoorGrid))); } if (isShowGrid) { DrawningFraemworkElements.Add(new CoorGrid((int)_currentGridScale / Constants.MainScale, _areaWidth, _areaHeight)); Canvas.SetZIndex((UIElement)DrawningFraemworkElements.Last(), -40); } }