Skip to content

Commit 143b43f

Browse files
committed
Added EditorConfig settings. Added a few tips to prevent docking.
1 parent 9098d96 commit 143b43f

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

Diff for: .editorconfig

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# editorconfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default settings:
7+
# A newline ending every file
8+
# Use 4 spaces as indentation
9+
[*]
10+
insert_final_newline = true
11+
indent_style = space
12+
indent_size = 4
13+
14+
# reStructuredText files
15+
[*.{rst,rest}]
16+
insert_final_newline = true
17+
indent_style = space
18+
indent_size = 2
19+
20+
# Xml project files
21+
[*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}]
22+
indent_size = 2
23+
24+
# Xml files
25+
[*.{xml,stylecop,resx,ruleset}]
26+
indent_size = 2
27+
28+
# Xml config files
29+
[*.{props,targets,config,nuspec}]
30+
indent_size = 2
31+
32+
# Shell scripts
33+
[*.sh]
34+
end_of_line = lf
35+
[*.{cmd, bat}]
36+
end_of_line = crlf

Diff for: tutorials/basics.rst

+22
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,25 @@ However, sometimes the contents should be placed into different panes and shown
5151
amcActivateModsMonitor.Show(dmcDownloadMonitor.Pane, DockAlignment.Right, 0.5);
5252
5353
54+
How to Lock Layout and Prevent Dock Panels From Moving
55+
------------------------------------------------------
56+
57+
Lock Entire Layout
58+
^^^^^^^^^^^^^^^^^^
59+
To lock the entire layout, the following snippet can be used to disable all end user docking at ``DockPanel`` level,
60+
61+
.. code-block:: csharp
62+
63+
dockPanel.AllowEndUserDocking = false;
64+
65+
Lock A Single Panels
66+
^^^^^^^^^^^^^^^^^^^^
67+
To lock only a single panel, the following snippet can be used to disable all end user docking at ``DockContent`` level,
68+
69+
.. code-block:: csharp
70+
71+
dockContent.DockHandler.AllowEndUserDocking = false;
72+
73+
Avoid A Few Dock States
74+
^^^^^^^^^^^^^^^^^^^^^^^
75+
To prevent a dock panel from entering some dock states, set ``DockContent.DockAreas`` to only the areas that are desired.

Diff for: tutorials/customizing-dockcontent.rst

-2
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,3 @@ It is possible to add keyboard shortcuts to enable switching among document tabs
7878
Remove a DockContent From DockPanel
7979
-----------------------------------
8080
To release a ``DockContent`` from ``DockPanel``, simply set ``DockContent.DockHandler.DockPanel`` to ``null``.
81-
82-

0 commit comments

Comments
 (0)