-
Notifications
You must be signed in to change notification settings - Fork 2
/
MyDockElementsSkinPainter.vb
47 lines (39 loc) · 1.68 KB
/
MyDockElementsSkinPainter.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
Imports System
Imports DevExpress.XtraBars.Docking.Paint
Imports DevExpress.XtraBars.Styles
Imports DevExpress.XtraBars.Docking
Namespace WindowsFormsApplication1
Public Class MyDockElementsSkinPainter
Inherits DockElementsSkinPainter
Public Sub New(ByVal paintStyle As SkinBarManagerPaintStyle)
MyBase.New(paintStyle)
End Sub
Protected Overrides Sub CreateElementPainters()
MyBase.CreateElementPainters()
fWindowPainter = New MyWindowSkinPainter(Me)
End Sub
Protected Overrides Sub OnStyleChanged(ByVal sender As Object, ByVal ea As EventArgs)
MyBase.OnStyleChanged(sender, ea)
fWindowPainter = New MyWindowSkinPainter(Me)
End Sub
Public Overrides Sub DrawWindowCaption(ByVal e As DrawWindowCaptionArgs)
Dim painter As MyWindowSkinPainter = TryCast(WindowPainter, MyWindowSkinPainter)
If painter IsNot Nothing Then painter.CurrentDockPanel = CurrentPanel
MyBase.DrawWindowCaption(e)
End Sub
Public Overrides Sub DrawApplicationCaption(ByVal args As DrawApplicationCaptionArgs)
Dim painter As MyWindowSkinPainter = TryCast(WindowPainter, MyWindowSkinPainter)
If painter IsNot Nothing Then painter.CurrentDockPanel = CurrentPanel
MyBase.DrawApplicationCaption(args)
End Sub
Private _CurrentPanel As DockPanel
Public Property CurrentPanel As DockPanel
Get
Return _CurrentPanel
End Get
Set(ByVal value As DockPanel)
_CurrentPanel = value
End Set
End Property
End Class
End Namespace