-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMyDockManager.vb
43 lines (35 loc) · 1.52 KB
/
MyDockManager.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
Imports System.ComponentModel
Imports System.Windows.Forms
Imports DevExpress.XtraBars.Docking
Namespace WindowsFormsApplication1
<DesignerCategory("")>
Public Class MyDockManager
Inherits DockManager
Public Sub New()
End Sub
Public Sub New(ByVal container As IContainer)
MyBase.New(container)
End Sub
Public Sub New(ByVal form As ContainerControl)
MyBase.New(form)
End Sub
Protected Overrides Function CreateDockPanel(ByVal dock As DockingStyle, ByVal createControlContainer As Boolean) As DockPanel
Return New MyDockPanel(createControlContainer, dock, Me)
End Function
Private Shared ReadOnly customDraw As Object = New Object()
Public Custom Event CustomDrawPanelCaption As CustomDrawEventHandler
AddHandler(ByVal value As CustomDrawEventHandler)
Events.AddHandler(customDraw, value)
End AddHandler
RemoveHandler(ByVal value As CustomDrawEventHandler)
Events.RemoveHandler(customDraw, value)
End RemoveHandler
RaiseEvent(ByVal sender As Object, ByVal e As MyCustomDrawArgs)
End RaiseEvent
End Event
Protected Friend Overridable Sub RaiseCustomDraw(ByVal args As MyCustomDrawArgs)
Dim handler As CustomDrawEventHandler = CType(Events(customDraw), CustomDrawEventHandler)
If handler IsNot Nothing Then handler(Me, args)
End Sub
End Class
End Namespace