public AddUserSubMenu() { InitializeComponent(); DataContext = new AddItemSubMenuViewModel(); context = DataContext as AddItemSubMenuViewModel; mode = SubMenuMode.ADD; }
public void InitializeForUpdate(ToDoListItem item) { mode = SubMenuMode.UPDATE; oldItem = item; context.InitializeForUpdate(item); }