Ejemplo n.º 1
0
        private void removeCanvasFromWS_Click(object sender, RoutedEventArgs e)
        {
            ListBoxItem     l = this.FindVisualParent <ListBoxItem>(sender as DependencyObject);
            SketchThumbnail s = l.Content as SketchThumbnail;

            _viewModel.RemoveFromWorkspace(s);
        }
Ejemplo n.º 2
0
        private void Thumb_DragDelta(object sender, System.Windows.Controls.Primitives.DragDeltaEventArgs e)
        {
            Thumb           t = e.Source as Thumb;
            SketchThumbnail s = t.DataContext as SketchThumbnail;

            s.x = s.x + e.HorizontalChange;
            s.y = s.y + e.VerticalChange;
        }
Ejemplo n.º 3
0
        private void Thumb_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            //MessageBox.Show("You double-clicked a thumbnail!");
            ListBoxItem     l = this.FindVisualParent <ListBoxItem>(sender as DependencyObject);
            SketchThumbnail s = l.Content as SketchThumbnail;
            CCanvas         c = _viewModel.allCanvases.Where(x => x.ID == s.canvasID).ToList()[0];

            _viewModel.EditCanvas(c);
        }
Ejemplo n.º 4
0
        public void RemoveFromWorkspace(SketchThumbnail s)
        {
            CCanvas c = allCanvases.Where(x => x.ID == s.canvasID).ToList()[0];

            activeWS.RemoveCanvas(c);
        }