protected override void OnLayout(ActivityDesignerLayoutEventArgs e)
 {
     if (!this.RootStateDesigner.HasActiveDesigner)
     {
         base.OnLayout(e);
     }
 }
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            Size size = base.OnLayoutSize(e);
            CompositeDesignerTheme designerTheme = e.DesignerTheme as CompositeDesignerTheme;

            if ((designerTheme != null) && this.Expanded)
            {
                size.Width  += 2 * designerTheme.ConnectorSize.Width;
                size.Height += designerTheme.ConnectorSize.Height;
            }
            return(size);
        }
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            Size containerSize = base.OnLayoutSize(e);

            CompositeDesignerTheme compositeDesignerTheme = e.DesignerTheme as CompositeDesignerTheme;

            if (compositeDesignerTheme != null && Expanded)
            {
                containerSize.Width  += 2 * compositeDesignerTheme.ConnectorSize.Width;
                containerSize.Height += compositeDesignerTheme.ConnectorSize.Height;
            }

            return(containerSize);
        }
Example #4
0
        protected override void OnLayoutPosition(ActivityDesignerLayoutEventArgs e)
        {
            base.OnLayoutPosition(e);

            // Draw a connector between the first and second activities contained in
            // the sequence activity used by this designer
            if (this.IsRootDesigner)
            {
                CompositeActivity parentActivity = (CompositeActivity)this.Activity;
                ConnectionPoint   sourcePoint    = GetConnectionPoint(parentActivity.Activities[0], 1, DesignerEdges.Bottom);
                ConnectionPoint   targetPoint    = GetConnectionPoint(parentActivity.Activities[1], 0, DesignerEdges.Top);

                this.AddConnector(sourcePoint, targetPoint);
            }
        }
Example #5
0
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            Size   size        = base.OnLayoutSize(e);
            string targetState = this.TargetState;

            if (string.IsNullOrEmpty(targetState))
            {
                targetState = "M";
            }
            Font font = e.DesignerTheme.Font;

            this.targetStateSize = StateMachineDesignerPaint.MeasureString(e.Graphics, font, targetState, StringAlignment.Near, Size.Empty);
            size.Height         += this.targetStateSize.Height;
            return(size);
        }
 protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
 {
     base.OnLayoutSize(e);
     return(new Size(200, 45));
 }
Example #7
0
 protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
 {
     return(new Size(65, 65));
 }