private void UpdateDesignerAdorner()
        {
            var pd  = ParentDesigner;
            var obj = DataContext as ICanvasItem;

            if (!IsSelected || pd == null || obj == null)
            {
                if (designerAdorner != null)
                {
                    designerAdorner.ParentCanvas.RemoveAdorner(designerAdorner);
                    designerAdorner = null;
                }
            }
            else
            {
                if (designerAdorner == null)
                {
                    designerAdorner = ParentDesigner.GenerateDesigningAdornerFormItem(obj);
                    if (designerAdorner != null)
                    {
                        designerAdorner.SetCanvas(pd);
                        pd.AddAdorner(designerAdorner);
                    }
                }
            }
        }
 protected override void OnPreviewMouseDown(MouseButtonEventArgs e)
 {
     base.OnPreviewMouseDown(e);
     ParentDesigner?.NotifyItemMouseDown(this);
     Focus();
     if (VisualTreeHelper.GetChildrenCount(contentPresenter) > 0)
     {
         var content = VisualTreeHelper.GetChild(contentPresenter, 0) as UIElement;
         if (content != null)
         {
             var ee = new RoutedEventArgs(BeforeDraggingStartedEvent, this);
             content.RaiseEvent(ee);
         }
     }
 }
Ejemplo n.º 3
0
 private void InsertPage()
 {
     ParentDesigner.InsertPageIntoWizard(false);
     ParentDesigner.OnSelectionChanged(this, EventArgs.Empty);
 }
Ejemplo n.º 4
0
 public void EditItems()
 {
     ParentDesigner.EditValue(Component, "Items");
 }
 private void InsertPage()
 {
     ParentDesigner.InsertPageIntoWizard(false);
 }
 private void AddPage()
 {
     ParentDesigner.InsertPageIntoWizard(true);
 }