Пример #1
0
		public ElementsViewModel(BaseDesignerCanvas designerCanvas)
		{
			ServiceFactoryBase.Events.GetEvent<ElementAddedEvent>().Subscribe(OnElementAdded);
			ServiceFactoryBase.Events.GetEvent<ElementRemovedEvent>().Subscribe(OnElementRemoved);
			ServiceFactoryBase.Events.GetEvent<ElementSelectedEvent>().Subscribe(OnElementSelected);
			DesignerCanvas = designerCanvas;

			Elements = new ObservableCollection<ElementBaseViewModel>();
			Update();
		}
Пример #2
0
		public RubberbandAdorner(BaseDesignerCanvas designerCanvas)
			: base(designerCanvas)
		{
			rubberband = new Rectangle
			{
				Stroke = Brushes.Navy,
				StrokeThickness = 1 / ZoomFactor,
				StrokeDashArray = new DoubleCollection(new double[] { 2 })
			};
		}
Пример #3
0
		public EllipseAdorner(BaseDesignerCanvas designerCanvas)
			: base(designerCanvas)
		{
		}
Пример #4
0
		public GridLineAdorner(BaseDesignerCanvas designerCanvas, Orientation orientation)
			: base(designerCanvas)
		{
			Orientation = orientation;
		}
Пример #5
0
		public PolygonAdorner(BaseDesignerCanvas designerCanvas)
			: base(designerCanvas)
		{
		}
Пример #6
0
		public TextBoxAdorner(BaseDesignerCanvas designerCanvas)
			: base(designerCanvas)
		{
		}
Пример #7
0
		public ToolboxViewModel(BaseDesignerCanvas designerCanvas)
		{
			DesignerCanvas = designerCanvas;
			RegisterInstruments();
			EventManager.RegisterClassHandler(typeof(Window), Keyboard.KeyDownEvent, new KeyEventHandler(OnKeyEventHandler), true);
		}