This repository has been archived by the owner on Sep 11, 2023. It is now read-only.
/
Form1.vb
82 lines (73 loc) · 2.61 KB
/
Form1.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Text
Imports System.Windows.Forms
Imports DevExpress.XtraLayout.Registrator
Imports DevExpress.XtraLayout
Imports DevExpress.LookAndFeel
Imports DevExpress.XtraLayout.Painting
Imports DevExpress.XtraLayout.ViewInfo
Imports DevExpress.Utils.Drawing
Imports DevExpress.Skins
Namespace WindowsApplication1
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
End Class
Public Class MySkinGroupObjectPainter
Inherits SkinGroupObjectPainter
Public Sub New(ByVal owner As IPanelControlOwner, ByVal provider As ISkinProvider)
MyBase.New(owner, provider)
End Sub
Protected Overrides Overloads Sub DrawCaption(ByVal info As GroupObjectInfoArgs)
If info.CaptionBounds.IsEmpty Then
Return
End If
info.Cache.FillRectangle(info.Cache.GetSolidBrush(Color.Aqua), info.CaptionBounds)
DrawButton(info)
DrawVString(info.Cache, info.AppearanceCaption, info.Caption, info.TextBounds, GetRotateAngle(info))
End Sub
End Class
Public Class MyLayoutControlImplementor
Inherits LayoutControlImplementor
Public Sub New(ByVal owner As ILayoutControlOwner)
MyBase.New(owner)
End Sub
Protected Overrides Sub InitializePaintStyles()
Dim lookAndFeelOwner As ISupportLookAndFeel = owner.GetISupportLookAndFeel()
If lookAndFeelOwner IsNot Nothing Then
PaintStyles.Add(New LayoutOffice2003PaintStyle(lookAndFeelOwner))
PaintStyles.Add(New LayoutWindowsXPPaintStyle(lookAndFeelOwner))
'
' TODO: Add your owner PaintStyle instead of PaintStyles.Add(new LayoutSkinPaintStyle(lookAndFeelOwner));
'
PaintStyles.Add(New MyLayoutSkinPaintStyle(lookAndFeelOwner))
PaintStyles.Add(New Style3DPaintStyle(lookAndFeelOwner))
PaintStyles.Add(New UltraFlatPaintStyle(lookAndFeelOwner))
PaintStyles.Add(New FlatPaintStyle(lookAndFeelOwner))
End If
lookAndFeelOwner = Nothing
End Sub
End Class
Public Class MyLayoutSkinPaintStyle
Inherits LayoutSkinPaintStyle
Public Sub New(ByVal lookAndFeelOwner As ISupportLookAndFeel)
MyBase.New(lookAndFeelOwner)
End Sub
Public Overrides Function CreateGroupPainter(ByVal owner As IPanelControlOwner) As GroupObjectPainter
Return New MySkinGroupObjectPainter(owner, LookAndFeel)
End Function
End Class
Public Class MyLayoutControl
Inherits LayoutControl
Protected Overrides Function CreateILayoutControlImplementorCore() As LayoutControlImplementor
Return New MyLayoutControlImplementor(Me)
End Function
End Class
End Namespace