private void Thumbnails_Click(object sender, RoutedEventArgs e)
        {
            ScatterViewItem svi = Container.ItemContainerGenerator.ContainerFromItem(thumbnails) as ScatterViewItem;
            if (svi == null)
            {
                thumbnails = new Thumbnails(this);
                Container.Items.Add(thumbnails);
                svi = Container.ItemContainerGenerator.ContainerFromItem(thumbnails) as ScatterViewItem;

                svi.Orientation = 0;
                svi.VerticalContentAlignment = System.Windows.VerticalAlignment.Stretch;
                svi.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Stretch;
                svi.Height = this.Height / 2;
                svi.Width = this.Width/1.3;
                svi.CanMove = false;
                svi.CanRotate = false;
                svi.CanScale = false;

                svi.Visibility = System.Windows.Visibility.Hidden;
                svi.Center =  CanvasItem.ActualCenter;
            }
            if (svi.Visibility == System.Windows.Visibility.Visible)
                Container.Items.Remove(thumbnails);
            else
            {

                ActiveSessionManager.SaveCurrentPage(PageInkCanvas.Strokes);
                svi.Visibility = System.Windows.Visibility.Visible;
            }
        }
        private void CreateASG(Canvas root)
        {
            ActiveSessionManager = new SessionManager(PageInkCanvas, root);

            canvasHelper = new DrawingCanvasHelper(ActiveSessionManager, PageInkCanvas, Container, CurrentColor,ColorWheel);
            this.mainCanvasRoot = root;
            events = new EventsGesture(this);
            thumbnails = new Thumbnails(this);

            CanvasItem.Height = root.Height - 50;
            CanvasItem.Width = root.Width - 50;

            TextContainer.Center = new Point((double)root.Width / 2, (double)root.Height / 2);
            CanvasItem.Center = new Point((double)root.Width / 2, (double)root.Height / 2);

            TrashContainer.Center = new Point((double)root.Width - 30, (double)root.Height / 2);
            TrashContainer.Height = root.Height;
            TrashContainer.Width = 50;

            LeftMenu.Width = 50;
            LeftMenu.Center = new Point(10, (double)root.Height / 2.2);
            LeftMenu.Height = root.Height/1.5;

            TopMenu.Width = root.Width - 50 ;
            TopMenu.Center = new Point((double)root.Width / 2  , 25 );
            TopMenu.Height = 50;

            BottomMenu.Width = root.Width;
            BottomMenu.Height = 50;
            BottomMenu.Center = new Point((double)root.Width / 2 + 50, root.Height - 25);

            PageInkCanvas.Height = root.Height;
            PageInkCanvas.Width = root.Width;

            RemovingItemsShadow();

            TextContainer.Visibility = Visibility.Hidden;
            timerMessage = new DispatcherTimer();

            PageInkCanvas.ReleaseAllCaptures();
            canvasHelper.loadPenSettings();
            SetFontSize(root);
        }