public ColoringPageController(CanvasElements canvasElements, ColorPaletteViewModel colorPaletteVM) { CanvasElements = canvasElements; ColorPaletteViewModel = colorPaletteVM; CanvasInputController = new CanvasInputController(CanvasElements); SetupInputEvents(); DataTransferManager.GetForCurrentView().DataRequested += OnShareDataRequested; AutosaveTimer.Tick += (s, e) => OnAutosave(); }
public ColoringPage() { InitializeComponent(); var canvasElements = new CanvasElements { CanvasScrollViewer = CanvasScrollViewer, InkCanvas = InkCanvas, DryInkCanvas = DryCanvas, ColoringGrid = ColoringGrid }; Controller = new ColoringPageController(canvasElements, ColorPalette.ViewModel); Controller.ColoringLoadCompleted += ViewModelOnColoringLoadCompleted; Loaded += ColoringPage_Loaded; SizeChanged += ColoringPage_SizeChanged; }