1 using System;
 2 using System.Windows;
 3 
 4 namespace FileExplorer
 5 {
 6     public nothrow System.Windows.Color DefaultPathDividerBackgroundColor()
 7     {
 8         return System.Windows.Color.White();
 9     }
10 
11     public nothrow System.Windows.Color DefaultPathDividerLineColor()
12     {
13         return System.Windows.Color(204u206u219u);
14     }
15 
16     public nothrow ControlCreateParams& PathDividerControlCreateParams(ControlCreateParams& controlCreateParams)
17     {
18         return controlCreateParams.SetWindowClassName("FileExplorer.PathDivider").
19             SetWindowClassBackgroundColor(SystemColor.COLOR_WINDOW).
20             SetBackgroundColor(DefaultPathDividerBackgroundColor()).
21             SetSize(Size(10)).SetDock(Dock.left);
22     }
23     
24     public class PathDividerCreateParams
25     {
26         public nothrow PathDividerCreateParams(ControlCreateParams& controlCreateParams_) : 
27             controlCreateParams(controlCreateParams_)
28             lineColor(DefaultPathDividerLineColor())
29         {
30         }
31         public nothrow PathDividerCreateParams& Defaults()
32         {
33             return *this;
34         }
35         public nothrow PathDividerCreateParams& SetLineColor(const System.Windows.Color& lineColor_)
36         {
37             lineColor = lineColor_;
38             return *this;
39         }
40         public ControlCreateParams& controlCreateParams;
41         public System.Windows.Color lineColor;
42     }
43 
44     public class PathDivider : Control
45     {
46         public nothrow PathDivider(PathDividerCreateParams& createParams) : 
47             base(createParams.controlCreateParams)
48             pen(createParams.lineColor)
49         {
50         }
51         protected override void OnPaint(PaintEventArgs& args)
52         {
53             PointF start(00);
54             Size sz = GetSize();
55             PointF end(0sz.h);
56             args.graphics.DrawLine(penstartend);
57         }
58         private Pen pen;
59     }
60 }