Skip to content

Commit

Permalink
docs: update SukiSideMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraZiling committed Aug 11, 2024
1 parent b434e4a commit 6640d66
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/docs/.vitepress/config/zh.mts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const zh = defineConfig({
]
},
{
text: 'System',
text: '系统 API',
items: [
{ text: 'FilePicker', link: '/zh/documentation/controls/system/filepicker' },
]
Expand Down
16 changes: 15 additions & 1 deletion docs/docs/documentation/controls/navigation/sidemenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
## Example

```xml
<suki:SukiSideMenu>
<suki:SukiSideMenu
IsSearchEnabled="True" // Enabled Search function
>
<suki:SukiSideMenu.Items>
<suki:SukiSideMenuItem Header="Statistics">
<suki:SukiSideMenuItem.Icon>
Expand All @@ -21,6 +23,18 @@
</suki:SukiSideMenuItem>
</suki:SukiSideMenu.Items>

<suki:SukiSideMenu.ItemTemplate>
<DataTemplate>
<suki:SukiSideMenuItem
Classes="Compact" // Enabled Compact SideMenuItem style
Header="{Binding DisplayName}">
<suki:SukiSideMenuItem.Icon>
<avalonia:MaterialIcon Kind="{Binding Icon}" />
</suki:SukiSideMenuItem.Icon>
</suki:SukiSideMenuItem>
</DataTemplate>
</suki:SukiSideMenu.ItemTemplate>

<suki:SukiSideMenu.HeaderContent>
<!-- Header Content -->
</suki:SukiSideMenu.HeaderContent>
Expand Down
Binary file modified docs/docs/public/controls/navigation/sukisidemenu.webp
Binary file not shown.
16 changes: 15 additions & 1 deletion docs/docs/zh/documentation/controls/navigation/sidemenu.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
## 示例

```xml
<suki:SukiSideMenu>
<suki:SukiSideMenu
IsSearchEnabled="True" // 启用搜索
>
<suki:SukiSideMenu.Items>
<suki:SukiSideMenuItem Header="Statistics">
<suki:SukiSideMenuItem.Icon>
Expand All @@ -21,6 +23,18 @@
</suki:SukiSideMenuItem>
</suki:SukiSideMenu.Items>

<suki:SukiSideMenu.ItemTemplate>
<DataTemplate>
<suki:SukiSideMenuItem
Classes="Compact" // 启用紧凑布局
Header="{Binding DisplayName}">
<suki:SukiSideMenuItem.Icon>
<avalonia:MaterialIcon Kind="{Binding Icon}" />
</suki:SukiSideMenuItem.Icon>
</suki:SukiSideMenuItem>
</DataTemplate>
</suki:SukiSideMenu.ItemTemplate>

<suki:SukiSideMenu.HeaderContent>
<!-- Header Content -->
</suki:SukiSideMenu.HeaderContent>
Expand Down

0 comments on commit 6640d66

Please sign in to comment.