Source/Controls/ControlWithBackgroundStyle.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace DevComponents.DotNetBar.Controls
{
[ToolboxItem(false)]
public class ControlWithBackgroundStyle : Control
{
#region Private Variables
private ElementStyle _BackgroundStyle = null;
private bool _AntiAlias = true;
#endregion
#region Events
#endregion
#region Constructor
/// <summary>
/// Initializes a new instance of the ControlWithBackgroundStyle class.
/// </summary>
public ControlWithBackgroundStyle()
{
this.SetStyle(ControlStyles.UserPaint, true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.Opaque, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.StandardDoubleClick, true);
this.SetStyle(DisplayHelp.DoubleBufferFlag, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
_BackgroundStyle = new ElementStyle();
_BackgroundStyle.StyleChanged += new EventHandler(this.VisualPropertyChanged);
}
#endregion
#region Internal Implementation
/// <summary>
/// Gets or sets whether anti-alias smoothing is used while painting. Default value is true.
/// </summary>
[DefaultValue(true), Category("Appearance"), Description("Gets or sets whether anti-aliasing is used while painting.")]
public bool AntiAlias
{
get { return _AntiAlias; }
set
{
if (_AntiAlias != value)
{
_AntiAlias = value;
this.Invalidate();
}
}
}
/// <summary>
/// Specifies the background style of the control.
/// </summary>
后面还有 89 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。