private void LoadImageButtons() { foreach (var species in _vm.AllMyFishSpecieses) { ImgBtnGenerator.AddButton(speciesBtnContainer, _vm.FishSelected_Command, StyleSheet.Species_Button_Width, StyleSheet.Species_Button_Height, species.Name, species.Icon, StyleSheet.Species_Font_Size, StyleSheet.Button_BackColor); } }
public NavNodePage(NavNodeViewModel vm) { InitializeComponent(); this.BindingContext = vm; foreach (var navNode in vm.NavigationNodes) { ImgBtnGenerator.AddButton(navNodesContainer, vm.ShowDetailPage, StyleSheet.Button_List_Width, StyleSheet.Button_List_Height, navNode, "expand_right.png", StyleSheet.Default_Label_Font_Size, Color.Olive, AlignImageEnumeration.Right); } }
public ImageButtonsPage(ImageButtonsViewModel vm) { InitializeComponent(); this.BindingContext = vm; foreach (var fish in vm.AvailableFishSpecies) { ImgBtnGenerator.AddButton(btnContainer, vm.FishSelected, StyleSheet.Button_List_Width, StyleSheet.Button_List_Height, fish.Name, fish.Icon, StyleSheet.Default_Label_Font_Size, Color.Blue); } }
private ScrollView CreateMenuCategoryContent(string category) { StackLayout stackLayout = new StackLayout(); foreach (var mi in _vm.GetMenuItems(category)) { Label lbl = new Label() { Text = $"{mi.Name} - {mi.Price}" }; ImgBtnGenerator.GetInstance().SetTapGestureRecognizer(lbl, _vm.MenuItemSelected, mi.Name); stackLayout.Children.Add(lbl); } return(new ScrollView() { Content = stackLayout }); }