Skip to content

Commit 5619633

Browse files
authored
Merge pull request #5 from DevExpress-Examples/doc_review
Fix example based on feedback
2 parents 1b48be4 + 3afd94a commit 5619633

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
@@ -12,9 +12,11 @@ The example demonstrates how to create an interactive multi-tab web interface wi
1212

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

15+
## Implementation Details
16+
1517
### Organize Content Into Tabs
1618

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.
1820

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

@@ -40,11 +42,11 @@ The CssClass property of a tab page serves as a unique identifier, allowing clie
4042

4143
### Persist Tab State
4244

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.
4446

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.
4648

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.
4850

4951
### Add Context Menu to Tabs
5052

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

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.
5961

6062
```razor
6163
<DxContextMenu @ref=menu>
@@ -68,17 +70,17 @@ Place [DxContextMenu](https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxCon
6870
</DxContextMenu>
6971
```
7072

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.
7274

7375
## Files to Review
7476

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

8385
## Documentation
8486

images/blazor-tabbed-ui.png

7.82 KB
Loading

0 commit comments

Comments
 (0)