public override void OnNavigatedTo(NavigatedToEventArgs e, Dictionary <string, object> viewModelState) { var frame = Window.Current.Content as Frame; _scrollView = VisualHelper.FindVisualChildInsideFrame <ScrollViewer>(frame); _canvasControl = (CanvasControl)_scrollView.Content; _strokes = new Stack <IDrawing>(); PenSize = 5; PenColor = paletteColors[paletteColors.Count - 1]; CurrentDrawingMode = DrawingMode.Lines; base.OnNavigatedTo(e, viewModelState); }