private void ExecuteGoToCommand(HomeScreenElementViewModel element)
 {
     switch (Title)
     {
         case "Min Side":
             if (IsAuthenticated())
                 ShowViewModel<MyPageViewModel>();
             else
                 ShowViewModel<LoginViewModel>();
             break;
         case "Arrangementer":
             ShowViewModel<EventListViewModel>();
             break;
         case "Søk":
             ShowViewModel<SearchViewModel>();
             break;
         case "Blogger":
             ShowViewModel<BlogOverviewViewModel>();
             break;
         case "Nyheter":
             ShowViewModel<NewsListingViewModel>();
             break;
         case "Anbefalinger":
             ShowViewModel<SuggestionsListListViewModel>();
             break;
         case "Åpningstider":
             ShowViewModel<OpeningHoursViewModel>();
             break;
         case "Kontakt oss":
             ShowViewModel<ContactInfoViewModel>();
             break;
         default:
             ShowViewModel<HomeScreenViewModel>();
             break;
     }
 }
示例#2
0
		UIColor ColorFor(HomeScreenElementViewModel item)
		{
			switch (item.IconChar)
			{
				case "m": // min side
					return UIColor.FromRGB(53,180,70);
				case "a": // arrangementer
					return UIColor.FromRGB(22,143,89);
				case "s": // søk
					return UIColor.FromRGB(0,115,19);
				case "h": // anbefalinger
					return UIColor.FromRGB(102,207,40);
				default : 
					return UIColor.FromRGB(53,180,70);

			}
		}