Skip to content

Commit 3afd94a

Browse files
committed
Tabbed UI example fixes and readme
1 parent 0ea84d0 commit 3afd94a

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@ The example demonstrates how to create an interactive multi-tab web interface wi
1111

1212
It showcases core features that help end users build their personalized workspaces and multitask effectively.
1313

14+
## Implementation Details
15+
1416
### Organize Content Into Tabs
1517

16-
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.
18+
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.
1719

1820
Insert your custom Blazor components or content directly into each DxTabPage.
1921

@@ -39,11 +41,11 @@ The CssClass property of a tab page serves as a unique identifier, allowing clie
3941

4042
### Persist Tab State
4143

42-
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+
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.
4345

44-
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+
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.
4547

46-
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+
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.
4749

4850
### Add Context Menu to Tabs
4951

@@ -54,7 +56,7 @@ Create a context menu that allows users to manage tabs:
5456
- Close all tabs except for the current one.
5557
- Restore closed tabs.
5658

57-
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.
59+
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.
5860

5961
```razor
6062
<DxContextMenu @ref=menu>
@@ -67,17 +69,17 @@ Place [DxContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxCon
6769
</DxContextMenu>
6870
```
6971

70-
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.
72+
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.
7173

7274
## Files to Review
7375

74-
- Index.razor
75-
- NavMenu.razor
76-
- MainLayout.razor
77-
- MDITab.cs
78-
- MDITabCollection.cs
79-
- MDIStateHelper.cs
80-
- mdi.js
76+
- [Index.razor](CS/DxBlazorApplication1/Components/Pages/Index.razor)
77+
- [NavMenu.razor](CS/DxBlazorApplication1/Components/Layout/NavMenu.razor)
78+
- [MainLayout.razor](CS/DxBlazorApplication1/Components/Layout/MainLayout.razor.css)
79+
- [MDITab.cs](CS/DxBlazorApplication1/Components/MDI/MDITab.cs)
80+
- [MDITabCollection.cs](CS/DxBlazorApplication1/Components/MDI/MDITabCollection.cs)
81+
- [MDIStateHelper.cs](CS/DxBlazorApplication1/Components/MDI/MDIStateHelper.cs)
82+
- [mdi.js](CS/DxBlazorApplication1/wwwroot/js/mdi.js)
8183

8284
## Documentation
8385

images/blazor-tabbed-ui.png

7.82 KB
Loading

0 commit comments

Comments
 (0)