--- title: SideMenu 侧边菜单 --- 当界面为左右布局时,可以使用侧边菜单来导航. {% note warning %} 目前侧边菜单只支持垂直布局,将来可能扩展为任意布局. {% endnote %} ```cs [DefaultProperty("Items")] [ContentProperty("Items")] [TemplatePart(Name = ElementPanel, Type = typeof(Panel))] public class SimpleItemsControl : Control ``` ```cs public class HeaderedSimpleItemsControl : SimpleItemsControl ``` ```cs public class SideMenu : HeaderedSimpleItemsControl ``` # 属性 |属性|描述|默认值|备注| |-|-|-|-| |AutoSelect|是否自动选中首项|true|| |ExpandMode|子项展开模式|ExpandMode.ShowOne|| |PanelAreaLength|子项容器高度|NaN|目前侧边菜单只支持垂直布局,将来可能扩展为任意布局,故此属性名称没有定为`PanelAreaHeight`| # 事件 |名称|说明| |-|-| | SelectionChanged | 选中项改变时触发 | # 案例 ```xml ``` ![SideMenu](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/SideMenu.png)