|
17 | 17 | Language="razor" |
18 | 18 | DemoStyle="height: 200px;"> |
19 | 19 | <DemoContent> |
20 | | - <PDSplitter Style="height: 180px;"> |
21 | | - <Panel1> |
| 20 | + <PDSplitter> |
| 21 | + <PDSplitPanel Size="1"> |
22 | 22 | <div class="p-2 bg-light h-100">Left Panel</div> |
23 | | - </Panel1> |
24 | | - <Panel2> |
| 23 | + </PDSplitPanel> |
| 24 | + <PDSplitPanel Size="1"> |
25 | 25 | <div class="p-2 bg-secondary text-white h-100">Right Panel</div> |
26 | | - </Panel2> |
| 26 | + </PDSplitPanel> |
27 | 27 | </PDSplitter> |
28 | 28 | </DemoContent> |
29 | 29 | <Description> |
30 | 30 | <p> |
31 | | - Define <code>Panel1</code> and <code>Panel2</code> content. Drag the divider to resize. |
| 31 | + Add any number of <code>PDSplitPanel</code> children. Each panel's <code>Size</code> is |
| 32 | + proportional to the sum of all siblings — two panels with <code>Size="1"</code> split evenly. |
32 | 33 | </p> |
33 | 34 | </Description> |
34 | 35 | </DocExample> |
35 | 36 | </section> |
36 | 37 |
|
37 | 38 | <section id="parameters"> |
38 | | - <h2 class="doc-section">Parameters</h2> |
| 39 | + <h2 class="doc-section">PDSplitter Parameters</h2> |
39 | 40 | <table class="table table-sm doc-props-table"> |
40 | 41 | <thead> |
41 | 42 | <tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr> |
42 | 43 | </thead> |
43 | 44 | <tbody> |
44 | | - <tr><td><code>Horizontal</code></td><td><code>bool</code></td><td>true</td><td>Horizontal (left/right) or vertical (top/bottom)</td></tr> |
45 | | - <tr><td><code>Panel1Size</code></td><td><code>string</code></td><td>"50%"</td><td>Initial size of first panel</td></tr> |
46 | | - <tr><td><code>Panel1MinSize</code></td><td><code>string</code></td><td>"10%"</td><td>Minimum size of first panel</td></tr> |
47 | | - <tr><td><code>Panel2MinSize</code></td><td><code>string</code></td><td>"10%"</td><td>Minimum size of second panel</td></tr> |
48 | | - <tr><td><code>GutterSize</code></td><td><code>int</code></td><td>4</td><td>Width of the draggable divider</td></tr> |
| 45 | + <tr><td><code>Direction</code></td><td><code>SplitDirection</code></td><td><code>Horizontal</code></td><td>Split axis: <code>Horizontal</code> (left/right) or <code>Vertical</code> (top/bottom)</td></tr> |
| 46 | + <tr><td><code>ExpandToMin</code></td><td><code>bool</code></td><td><code>false</code></td><td>Expand panels to their minimum size on initial render</td></tr> |
| 47 | + <tr><td><code>GutterSize</code></td><td><code>int</code></td><td><code>10</code></td><td>Width of the draggable divider in pixels</td></tr> |
| 48 | + <tr><td><code>GutterAlign</code></td><td><code>string</code></td><td><code>"center"</code></td><td>Gutter alignment between elements</td></tr> |
| 49 | + <tr><td><code>SnapOffset</code></td><td><code>int</code></td><td><code>30</code></td><td>Distance in pixels from minimum size at which the panel snaps</td></tr> |
| 50 | + <tr><td><code>DragInterval</code></td><td><code>int</code></td><td><code>1</code></td><td>Number of pixels per drag step</td></tr> |
| 51 | + <tr><td><code>CssClass</code></td><td><code>string</code></td><td><code>""</code></td><td>Additional CSS classes for the container element</td></tr> |
| 52 | + </tbody> |
| 53 | + </table> |
| 54 | + |
| 55 | + <h2 class="doc-section mt-3">PDSplitPanel Parameters</h2> |
| 56 | + <table class="table table-sm doc-props-table"> |
| 57 | + <thead> |
| 58 | + <tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr> |
| 59 | + </thead> |
| 60 | + <tbody> |
| 61 | + <tr><td><code>Size</code></td><td><code>int</code></td><td><code>1</code></td><td>Proportional size relative to all sibling panels (e.g. <code>Size="1"</code> and <code>Size="2"</code> gives 33%/67%)</td></tr> |
| 62 | + <tr><td><code>MinSize</code></td><td><code>int</code></td><td><code>100</code></td><td>Minimum panel size in pixels</td></tr> |
| 63 | + <tr><td><code>CssClass</code></td><td><code>string</code></td><td><code>""</code></td><td>Additional CSS classes for the panel element</td></tr> |
49 | 64 | </tbody> |
50 | 65 | </table> |
51 | 66 | </section> |
|
0 commit comments