关闭

自定义图片填充工作流外观

520人阅读 评论(0) 收藏 举报

protected override Size OnLayoutSize(ActivityDesignerLayoutEventArgs e)
        {
            return new Size(70, 60);
        }

protected override void OnPaint(ActivityDesignerPaintEventArgs e)
        {

            Rectangle frameRect = new Rectangle(this.Location.X, this.Location.Y, this.Size.Width, this.Size.Height);
            Rectangle titleRect = new Rectangle(frameRect.X, frameRect.Y, frameRect.Width, 30);
            Rectangle imageRect = new Rectangle((titleRect.X + 35), titleRect.Y + 30, this.Size.Width - 66, 30);

            Image mImage = Properties.Resources.FaultHandleActivity;
            e.Graphics.DrawImage(mImage, imageRect);

            ActivityDesignerPaint.DrawText(e.Graphics, new Font("Segoe UI", 8), parentActivity.ActivityTitle, titleRect,    StringAlignment.Center, e.AmbientTheme.TextQuality, Brushes.DarkGreen);

                   
           
        }

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:6551次
    • 积分:112
    • 等级:
    • 排名:千里之外
    • 原创:5篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档