Example #1
0
        private void FigureItems_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var selected = FigureItems.SelectedItem;

            IFigure selectedFigure = selected as IFigure;

            if (selectedFigure != null)
            {
                selectedFigure.Selected = true;
            }

            pg.Show(selectedFigure, CurrentDrawing.ActionManager);

            //FigureItems.SelectedValue = selectedFigure;

            CurrentDrawing.RaiseSelectionChanged(CurrentDrawing.GetSelectedFigures());
        }
Example #2
0
 public void ShowProperties(IEnumerable <object> selection)
 {
     try
     {
         PropertyGrid.Show(selection, CurrentDrawing.ActionManager);
     }
     catch (Exception ex)
     {
         CurrentDrawing.RaiseError(this, ex);
     }
 }
Example #3
0
 public virtual void ShowProperties(object selection)
 {
     try
     {
         PropertyGrid.Show(selection, CurrentDrawing.ActionManager);
     }
     catch (Exception ex)
     {
         CurrentDrawing.RaiseError(this, ex);
     }
 }
Example #4
0
            public void Done()
            {
                Parent.Inputs   = Parent.behavior.GetSelection();
                Parent.behavior = new MacroResultSelector(Parent.Drawing, Parent.Inputs);
                var dialog = new SelectResultsDialog(Parent);

                if (PropertyGrid != null)
                {
                    PropertyGrid.Show(dialog, null);
                }
            }
Example #5
0
        public void EditStyleButton()
        {
            var drawingHost = Canvas.Parent as DrawingHost;

            if (drawingHost != null)
            {
                if (PropertyGrid != null)
                {
                    Style.CurrentEditInfo.ActionManager = this.Drawing.ActionManager;
                    Style.CurrentEditInfo.ParentObject  = this;
                    Style.CurrentEditInfo.PropertyGrid  = PropertyGrid;
                    PropertyGrid.Show(this.Style, this.Drawing.ActionManager);
                }
            }
        }
Example #6
0
 public void OK()
 {
     PropertyGrid.Show(null, null);
     OKClicked();
 }