public void SetBounds() { var capOrg = _hostShape.capOrgProvider(); if (text != null) { text.SetPosForCluster(capOrg.X + textX, capOrg.Y + textY); } if (_freeDraw != null) { _freeDraw.SetPosForCluster(capOrg.X + freeDrawX, capOrg.Y + freeDrawY); } var btnOrg = HostShape.btnOrgProvider(); //btn draw Canvas.SetLeft(btnDraw, btnOrg.X); Canvas.SetTop(btnDraw, btnOrg.Y); //btn type Canvas.SetLeft(btnType, btnOrg.X + 50); Canvas.SetTop(btnType, btnOrg.Y); }
private void CaptionCreationRequested(CaptionType type, ICaptionHost host) { BeginHostCaption(host, type); switch (type) { case CaptionType.FreeDraw: EnterShapeCreationMode(VdShapeType.FreeForm, -1); break; case CaptionType.Text: //emulate text creation _palette.shapeType = VdShapeType.Text; EnterShapeCreationMode(VdShapeType.Text, -1); var clickLocation = host.capOrgProvider(); InpDeviceDown(new Point(clickLocation.X, clickLocation.Y), null); break; } }