-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomDockPanel.cs
60 lines (54 loc) · 1.77 KB
/
CustomDockPanel.cs
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
// Developer Express Code Central Example:
// How to completely hide the dock panel's caption?
//
// By setting the DockManager.DockingOptions.ShowCaptionOnMouseHover property it's
// possible to set whether the dock panel's caption is shown only when the mouse
// pointer hovers over the panel's top or all the time. This example demonstrates
// how to prevent the dock panel's caption from being shown for an individual dock
// panel all the time.
//
// You can find sample updates and versions for different programming languages here:
// http://www.devexpress.com/example=E1940
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars.Docking;
using DevExpress.XtraBars.Docking.Helpers;
namespace WindowsApplication81
{
public class CustomDockPanel : DockPanel
{
public CustomDockPanel()
: this(false, DockingStyle.Float, null)
{
}
public CustomDockPanel(bool createControlContainer, DockingStyle dock, DockManager dockManager)
: base(createControlContainer, dock, dockManager)
{
DockLayout = new CustomDockLayout(dock, this);
}
//// Fields...
private bool _ShowCaption = true;
public bool ShowCaption
{
get { return _ShowCaption; }
set
{
if (_ShowCaption != value)
{
_ShowCaption = value;
DockLayout.LayoutChanged();
}
}
}
CustomDockLayout DockLayout
{
get { return base.DockLayout as CustomDockLayout; }
set { base.DockLayout = value; }
}
}
}