43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using CPF.Drawing;
|
|
using CPF.ReoGrid.Drawing;
|
|
using CPF.ReoGrid.Rendering;
|
|
|
|
namespace CPF.ReoGrid.WPF
|
|
{
|
|
internal class RightThumb : UIElement
|
|
{
|
|
public RightThumb(SheetTabControl owner)
|
|
{
|
|
this.owner = owner;
|
|
this.Width = 5;
|
|
this.Height = "100%";
|
|
}
|
|
|
|
protected override void OnRender(DrawingContext drawingContext)
|
|
{
|
|
CPFPen cpfpen = new CPFPen(this.owner.BorderColor, 1f);
|
|
float num2;
|
|
float num3;
|
|
for (float num = 3f; num < base.ActualSize.Height - 3f; num += 4f)
|
|
{
|
|
Brush fillBrush = StaticResources.SystemColor_ControlDark;
|
|
num2 = 0f;
|
|
num3 = 2f;
|
|
float num4 = 2f;
|
|
drawingContext.FillRectangle(fillBrush, new Rect(ref num2, ref num, ref num3, ref num4));
|
|
}
|
|
float width = base.ActualSize.Width;
|
|
Stroke stroke = cpfpen.Stroke;
|
|
Brush brush = cpfpen.Brush;
|
|
num2 = 0f;
|
|
Point point = new Point(ref width, ref num2);
|
|
num3 = base.ActualSize.Height;
|
|
Point point2 = new Point(ref width, ref num3);
|
|
drawingContext.DrawLine(stroke, brush, point, point2);
|
|
}
|
|
|
|
private SheetTabControl owner;
|
|
}
|
|
}
|