public ZRoleViewModel() { IRepository <Role> mRole = new Repository <Role>(); _roles = new ObservableCollection <Role>(mRole.GetAll()); SelectedIndex = -1; SelectedRole = new Role(); _editRole = new ZRoleEditViewModel(SelectedRole); _editUC = new ZRoleEditUserControl(_editRole); }
public ZRoleEditUserControl(ZRoleEditViewModel context) { InitializeComponent(); this.DataContext = context; }