You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,9 +12,11 @@ The example demonstrates how to create an interactive multi-tab web interface wi
12
12
13
13
It showcases core features that help end users build their personalized workspaces and multitask effectively.
14
14
15
+
## Implementation Details
16
+
15
17
### Organize Content Into Tabs
16
18
17
-
Place [DxTabs](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTabs) container on the page (_Components/Pages/Index.razor_) and add a [DxTabPage](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTabPage) for each tab.
19
+
Place [DxTabs](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTabs) container on the page ([Index.razor](CS/DxBlazorApplication1/Components/Pages/Index.razor)) and add a [DxTabPage](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxTabPage) for each tab.
18
20
19
21
Insert your custom Blazor components or content directly into each DxTabPage.
20
22
@@ -40,11 +42,11 @@ The CssClass property of a tab page serves as a unique identifier, allowing clie
40
42
41
43
### Persist Tab State
42
44
43
-
Implement a custom **MDITab** class to encapsulate specific properties of each individual tab. **MDITabCollection** will control visibility, display order, and titles of all tabs. The title links an underlying object to the visual tab representation in the UI.
45
+
Implement a custom `MDITab` class to encapsulate specific properties of each individual tab. `MDITabCollection` will control visibility, display order, and titles of all tabs. The title links an underlying object to the visual tab representation in the UI.
44
46
45
-
Bind these properties to the visual tab elements in the UI. To ensure the MDITabCollection accurately reflects the live interface, implement event handlers for TabReorder and TabClosing. These handlers will listen for user actions and dynamically update the collection to match the current tab state.
47
+
Bind these properties to the visual tab elements in the UI. To ensure the `MDITabCollection` accurately reflects the live interface, implement event handlers for TabReorder and TabClosing. These handlers will listen for user actions and dynamically update the collection to match the current tab state.
46
48
47
-
To maintain the tab layout across sessions, serialize the collection to JSON and save it to the browser's local storage with **MDIStateHelper** class every time the UI layout changes. It maintains the tab visibility and order even after the user closes and reopens the browser. Tab state is restored in the OnAfterRenderAsync event handler.
49
+
To maintain the tab layout across sessions, serialize the collection to JSON and save it to the browser's local storage with `MDIStateHelper` class every time the UI layout changes. It maintains the tab visibility and order even after the user closes and reopens the browser. Tab state is restored in the OnAfterRenderAsync event handler.
48
50
49
51
### Add Context Menu to Tabs
50
52
@@ -55,7 +57,7 @@ Create a context menu that allows users to manage tabs:
55
57
- Close all tabs except for the current one.
56
58
- Restore closed tabs.
57
59
58
-
Place [DxContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxContextMenu) on the page (_Components/Pages/Index.razor_) and add a [DxContextMenuItem](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxContextMenuItem) for each menu action.
60
+
Place [DxContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxContextMenu) on the page ([Index.razor](CS/DxBlazorApplication1/Components/Pages/Index.razor)) and add a [DxContextMenuItem](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxContextMenuItem) for each menu action.
59
61
60
62
```razor
61
63
<DxContextMenu @ref=menu>
@@ -68,17 +70,17 @@ Place [DxContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxCon
68
70
</DxContextMenu>
69
71
```
70
72
71
-
Implement a client-side script (_wwwroot/js/mdi.js_) to handle right-clicks on specific tabs, identified by their CssClass property. This script should prevent the default browser context menu. Capture the mouse position, and invoke a .NET [JSInvokable] method.
73
+
Implement a client-side script ([mdi.js](CS/DxBlazorApplication1/wwwroot/js/mdi.js)) to handle right-clicks on specific tabs, identified by their CssClass property. This script should prevent the default browser context menu. Capture the mouse position, and invoke a .NET `[JSInvokable]` method.
0 commit comments