コード例 #1
0
 protected override void OnPaintBackground(PaintEventArgs e)
 {
     if (!DwmAPI.DwmIsCompositionEnabled() || DesignMode)
     {
         base.OnPaintBackground(e);
     }
 }
コード例 #2
0
 protected override void OnPaint(PaintEventArgs e)
 {
     if (DwmAPI.DwmIsCompositionEnabled() && !DesignMode)
     {
         UXTheme.DrawText(e.Graphics, Text, this.Font, ClientRectangle, ForeColor, TextAlignToFormatFlags(TextAlign) | TextFormatFlags.NoClipping, UXTheme.TextStyle.Glowing);
     }
     else
     {
         base.OnPaint(e);
     }
 }