|
| 1 | +--- |
| 2 | +title: How to Add a Footer to the DockManagerContentPane |
| 3 | +description: Learn how to add a fixed footer to the DockManagerContentPane. |
| 4 | +type: how-to |
| 5 | +page_title: How to Add a Fixed Footer to DockManagerContentPane in UI for Blazor |
| 6 | +meta_title: How to Add a Fixed Footer to DockManagerContentPane in UI for Blazor |
| 7 | +slug: dockmanager-kb-add-content-pane-footer |
| 8 | +tags: dockmanager, content, pane, footer, header, fixed |
| 9 | +res_type: kb |
| 10 | +ticketid: 1700189 |
| 11 | +--- |
| 12 | + |
| 13 | +## Environment |
| 14 | +<table> |
| 15 | + <tbody> |
| 16 | + <tr> |
| 17 | + <td>Product</td> |
| 18 | + <td>DockManager for Blazor</td> |
| 19 | + </tr> |
| 20 | + </tbody> |
| 21 | +</table> |
| 22 | + |
| 23 | +## Description |
| 24 | + |
| 25 | +I want to add a footer below the content block in the [`DockManagerContentPane`](slug:dockmanager-pane-types) component. The footer should remain fixed while the content block is scrollable. |
| 26 | + |
| 27 | +## Solution |
| 28 | + |
| 29 | +To add a fixed footer below a scrollable content in a `DockManagerContentPane`, define a `div` container with `display: flex; flex-direction: column;` and set the scrollable content and footer as separate sections. |
| 30 | + |
| 31 | +````Razor |
| 32 | +<TelerikDockManager Height="90vh"> |
| 33 | + <DockManagerPanes> |
| 34 | +
|
| 35 | + <DockManagerSplitPane Orientation="@DockManagerPaneOrientation.Vertical" Size="40%"> |
| 36 | + <Panes> |
| 37 | +
|
| 38 | + <DockManagerContentPane Size="55%" HeaderText="Pane 1.1"> |
| 39 | + <HeaderTemplate> |
| 40 | + <div style="color: darkblue; font-weight: bold;"> |
| 41 | + Custom Header for Pane 1.1 |
| 42 | + </div> |
| 43 | + </HeaderTemplate> |
| 44 | + <Content> |
| 45 | + <div style="display: flex; flex-direction: column; height: 100%;"> |
| 46 | + <!-- Scrollable content --> |
| 47 | + <div style="flex: 1; overflow-y: auto; padding: 0.5rem;"> |
| 48 | + @for (int i = 1; i <= 30; i++) |
| 49 | + { |
| 50 | + <div>Scrollable content line @i</div> |
| 51 | + } |
| 52 | + </div> |
| 53 | +
|
| 54 | + <!-- Fixed footer --> |
| 55 | + <div style="background: #f0f0f0; padding: 0.5rem; border-top: 1px solid #ccc;"> |
| 56 | + <strong>Custom Footer (Fixed)</strong> |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + </Content> |
| 60 | + </DockManagerContentPane> |
| 61 | +
|
| 62 | + <DockManagerContentPane HeaderText="Pane 1.2"> |
| 63 | + <Content> |
| 64 | + Second Content Pane in Split configuration |
| 65 | + </Content> |
| 66 | + </DockManagerContentPane> |
| 67 | +
|
| 68 | + </Panes> |
| 69 | + </DockManagerSplitPane> |
| 70 | +
|
| 71 | + <DockManagerTabGroupPane> |
| 72 | + <Panes> |
| 73 | +
|
| 74 | + <DockManagerContentPane HeaderText="Tab 2.1"> |
| 75 | + <Content> |
| 76 | + First Tab Content |
| 77 | + </Content> |
| 78 | + </DockManagerContentPane> |
| 79 | +
|
| 80 | + <DockManagerContentPane HeaderText="Tab 2.2"> |
| 81 | + <Content> |
| 82 | + Second Tab Content |
| 83 | + </Content> |
| 84 | + </DockManagerContentPane> |
| 85 | +
|
| 86 | + </Panes> |
| 87 | + </DockManagerTabGroupPane> |
| 88 | + </DockManagerPanes> |
| 89 | +</TelerikDockManager> |
| 90 | +```` |
| 91 | + |
| 92 | +## See Also |
| 93 | +- [DockManager Documentation](slug:dockmanager-overview) |
0 commit comments