Ejemplo n.º 1
0
        private void SetEditControl(UIElement toolObject, bool isDragObject)
        {
            if (toolObject.GetType() == typeof(ResizeHandle))
            {
                this.isHandle = true;

                ResizeHandles.SelectedElement = toolObject;

                return;
            }

            if (!KeyActions.IsCtrlPressed)
            {
                ResizeHandles.RemoveHandles();
            }

            ResizeHandles.SelectedElement = toolObject;

            ResizeHandles.SelectedElement.ShowHandles(this);

            if (!isDragObject)
            {
                this.AddReportToolItem(toolObject);

                toolObject.UpdateLayout();

                toolObject.MoveHandles();
            }

            Guid elementId = toolObject.GetElementId();

            this.ReportObjectSelected?.Invoke(toolObject);
        }
Ejemplo n.º 2
0
        private void SectionCanvas_Seleced(object sender, MouseButtonEventArgs e)
        {
            ResizeHandles.RemoveHandles();

            ResizeHandles.SelectedElement = null;

            this.ReportObjectSelected?.Invoke(null);
        }