Ejemplo n.º 1
0
		protected override async void ConfigureSubviews (IListItem item)
		{
			ViewModel = item as BaseMenuItemViewModel;

			await ViewModel.DidLoad ();

			InitUI ();
			InitBindings ();
		}
Ejemplo n.º 2
0
        private async Task <BaseMenuItemViewModel> TryAdd(BaseMenuItemViewModel viewModel)
        {
            var existingViewModel = ItemViewModels.FirstOrDefault(vm => ((BaseMenuItemViewModel)vm).Title.Equals(viewModel.Title)) as BaseMenuItemViewModel;

            if (existingViewModel == null)
            {
                existingViewModel = viewModel;

                await existingViewModel.DidLoad();

                ItemViewModels.Insert(0, existingViewModel);
            }
            return(existingViewModel);
        }
Ejemplo n.º 3
0
		private async Task<BaseMenuItemViewModel> TryAdd(BaseMenuItemViewModel viewModel)
		{
			var existingViewModel = ItemViewModels.FirstOrDefault (vm => ((BaseMenuItemViewModel)vm).Title.Equals (viewModel.Title)) as BaseMenuItemViewModel;

			if(existingViewModel == null) {

				existingViewModel = viewModel;

				await existingViewModel.DidLoad();

				ItemViewModels.Insert(0, existingViewModel);
			}
			return existingViewModel;
		}