Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #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);
        }
        public void RemoveFromWorkspace(SketchThumbnail s)
        {
            CCanvas c = allCanvases.Where(x => x.ID == s.canvasID).ToList()[0];

            activeWS.RemoveCanvas(c);
        }