mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2025-07-02 07:09:27 +03:00
DarkSeparator control
This commit is contained in:
parent
7e7cf7c9f2
commit
784e3b69b7
44
DarkUI/Controls/DarkSeparator.cs
Normal file
44
DarkUI/Controls/DarkSeparator.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System.Drawing;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
|
||||||
|
namespace DarkUI
|
||||||
|
{
|
||||||
|
public class DarkSeparator : Control
|
||||||
|
{
|
||||||
|
#region Constructor Region
|
||||||
|
|
||||||
|
public DarkSeparator()
|
||||||
|
{
|
||||||
|
SetStyle(ControlStyles.Selectable, false);
|
||||||
|
|
||||||
|
Dock = DockStyle.Top;
|
||||||
|
Size = new Size(1, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Paint Region
|
||||||
|
|
||||||
|
protected override void OnPaint(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
var g = e.Graphics;
|
||||||
|
|
||||||
|
using (var p = new Pen(Colors.DarkBorder))
|
||||||
|
{
|
||||||
|
g.DrawLine(p, ClientRectangle.Left, 0, ClientRectangle.Right, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
using (var p = new Pen(Colors.LightBorder))
|
||||||
|
{
|
||||||
|
g.DrawLine(p, ClientRectangle.Left, 1, ClientRectangle.Right, 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnPaintBackground(PaintEventArgs e)
|
||||||
|
{
|
||||||
|
// Absorb event
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -52,6 +52,9 @@
|
|||||||
<Compile Include="Controls\DarkScrollBar.cs">
|
<Compile Include="Controls\DarkScrollBar.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Controls\DarkSeparator.cs">
|
||||||
|
<SubType>Component</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Controls\DarkStatusStrip.cs">
|
<Compile Include="Controls\DarkStatusStrip.cs">
|
||||||
<SubType>Component</SubType>
|
<SubType>Component</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
2
Example/Forms/MainForm.Designer.cs
generated
2
Example/Forms/MainForm.Designer.cs
generated
@ -526,7 +526,7 @@
|
|||||||
//
|
//
|
||||||
this.toolStripStatusLabel6.Margin = new System.Windows.Forms.Padding(0, 0, 50, 2);
|
this.toolStripStatusLabel6.Margin = new System.Windows.Forms.Padding(0, 0, 50, 2);
|
||||||
this.toolStripStatusLabel6.Name = "toolStripStatusLabel6";
|
this.toolStripStatusLabel6.Name = "toolStripStatusLabel6";
|
||||||
this.toolStripStatusLabel6.Size = new System.Drawing.Size(261, 14);
|
this.toolStripStatusLabel6.Size = new System.Drawing.Size(230, 14);
|
||||||
this.toolStripStatusLabel6.Spring = true;
|
this.toolStripStatusLabel6.Spring = true;
|
||||||
this.toolStripStatusLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
this.toolStripStatusLabel6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user