赞
踩
新增文件夹Common-Models,新建菜单类名:MenuBar.cs
- /// <summary>
- /// 系统导航菜单实体类
- /// </summary>
- public class MenuBar : BindableBase//支持动态变更
- {
- private string icon;
- /// <summary>
- /// 菜单图标
- /// </summary>
- public string Icon
- {
- get { return icon; }
- set { icon = value; }
- }
- private string title;
- /// <summary>
- /// 菜单名称
- /// </summary>
- public string Title
- {
- get { return title; }
- set { title = value; }
- }
- private string nameSpace;
- /// <summary>
- /// 菜单命名空间
- /// </summary>
- public string NameSpace
- {
- get { return nameSpace; }
- set { nameSpace = value; }
- }
-
- }
新建Views,ViewModels文件夹,将原来的MainWindows.xaml改成MainView.xaml,移到ViewModels文件夹,在ViewModels文件夹中新建MainViewModel.cs文件:
- public class MainViewModel : BindableBase
- {
- public MainViewModel(
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。