Exemplo n.º 1
0
 public PermissionSelector()
 {
     InitializeComponent();
     _userRoleManager = new UserRoleManagerVM();
     _userRoleManager.RefreshItemsCommand.Execute(null);
     _funcTree = AppCxt.Current.FunctionManager.CloneFunctionTree();
     this.funTree.ItemsSource   = _funcTree;
     this.brd_popup.DataContext = _userRoleManager;
     this.popup.Opened         += Popup_Opened;
 }
Exemplo n.º 2
0
 public UserRoleSelector()
 {
     InitializeComponent();
     _viewModel = new UserRoleManagerVM();
     _viewModel.ItemList.CollectionChanged += ItemList_CollectionChanged;
     _viewModel.RefreshItemsCommand.Execute(null);
     lcv = new ListCollectionView(_viewModel.ItemList);
     lcv.IsLiveFiltering = true;
     lcv.LiveFilteringProperties.Add("IsSelected");
     lcv.Filter = (p) =>
     {
         return((p as UserRoleVM).IsSelected);
     };
     this.list_selected.ItemsSource  = lcv;
     this.brd_popup.DataContext      = _viewModel;
     this.list_forSelect.ItemsSource = _viewModel.ItemList;
     this.popup.Opened += Popup_Opened;
 }