コード例 #1
0
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            Size           size   = base.OnLayoutSize(e);
            WorkflowFooter footer = this.Footer as WorkflowFooter;

            if (footer != null)
            {
                size.Height += (footer.ImageRectangle.Height + (2 * e.AmbientTheme.Margin.Height)) + footer.FooterBarRectangle.Size.Height;
            }
            if (this.Header != null)
            {
                this.Header.OnLayout(e);
            }
            if (this.Footer != null)
            {
                this.Footer.OnLayout(e);
            }
            return(size);
        }
        protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            Size size = base.OnLayoutSize(e);

            //Make sure that we set the minimum size
            WorkflowFooter footer = Footer as WorkflowFooter;

            if (footer != null)
            {
                size.Height += footer.ImageRectangle.Height + 2 * e.AmbientTheme.Margin.Height + footer.FooterBarRectangle.Size.Height;
            }

            if (Header != null)
            {
                Header.OnLayout(e);
            }

            if (Footer != null)
            {
                Footer.OnLayout(e);
            }

            return(size);
        }