/* #region 去除标题栏ICON [DllImport("user32.dll")] static extern int GetWindowLong(IntPtr hwnd, int index); [DllImport("user32.dll")] static extern int SetWindowLong(IntPtr hwnd, int index, int newStyle); [DllImport("user32.dll")
先看效果图 Get Start 为了项目解耦,使用mvvmlight框架.MVVM设计模式请自行了解. 1 新建项目 新建一个MvvmLight(WPF)项目,删除其中无关文件夹:Design+Model. 2 添加类 添加NavigationService类,继承ViewModelBase和INavigationService. using GalaSoft.MvvmLight; using GalaSoft.MvvmLight.Views; using System; using
设置隐藏时,这里将控件分为两类, 1.普通的按钮.下拉框等,根据控件的Name进行查找,设置IsEnabled为false; 2.ListView中嵌套控件,直接将列隐藏,根据GridViewColumn的Name进行查找,将CellTemplate = new DataTemplate(); public static void SetAuhority(ContentControl contentControl) { var list = LocalSession.AuthorityList.