public async override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); viewModel = await ClientListViewModel.Init(WorkspaceId); SetDialogContent(); }
public async override void ViewDidLoad() { base.ViewDidLoad(); View.Apply(Style.Screen); EdgesForExtendedLayout = UIRectEdge.None; viewModel = await ClientListViewModel.Init(workspaceId); // Set ObservableTableViewController settings // ObservableTableViewController is a helper class // from Mvvm light package. TableView.RowHeight = 60f; TableView.SeparatorStyle = UITableViewCellSeparatorStyle.None; CreateCellDelegate = CreateClientCell; BindCellDelegate = BindCell; DataSource = viewModel.ClientDataCollection; // TODO: Keep previous version calling // a handler. Later it can be changed. PropertyChanged += (sender, e) => { if (e.PropertyName == SelectedItemPropertyName) { handler.OnClientSelected(SelectedItem); } }; NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Add, OnAddBtnPressed); }
public async override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); if (viewModel == null) { viewModel = new ClientListViewModel(workspaceId, model); } await viewModel.Init(); if (viewModel.Model.Workspace == null || viewModel.Model.Workspace.Id == Guid.Empty) { Dismiss(); } }