2018年3月30日 星期五

winform顏色漸層


http://blog.xuite.net/gbisland/csharp/13724056-%E7%94%A8%E7%AD%86%E5%88%B7%E5%9C%A8+Windows+Form+%E7%95%AB%E5%87%BA%E6%9C%89%E5%B1%A4%E6%AC%A1%E7%9A%84%E8%83%8C%E6%99%AF%E9%A1%8F%E8%89%B2


private void panel2_Paint(object sender, PaintEventArgs e)
        {
            Graphics g = e.Graphics;
            System.Drawing.Drawing2D.LinearGradientBrush lb = new System.Drawing.Drawing2D.LinearGradientBrush(this.DisplayRectangle, Color.Red, Color.DarkTurquoise, 45);
            g.FillRectangle(lb, this.DisplayRectangle);

        }


建立user control方法
https://www.youtube.com/watch?v=pYdPs1ZXUPY

沒有留言:

張貼留言

WPF聊天室应用(ASP.NET Core SignalR)

  WPF聊天室应用(ASP.NET Core SignalR) https://www.bilibili.com/video/BV1Q741187Si?p=2 https://www.bilibili.com/video/BV1UV411e75T?from=search&...