public MasterPage(OptionItem menuItem) { var viewModel = new MapViewModel <T>(); BindingContext = viewModel; this.SetValue(Page.TitleProperty, menuItem.Title); this.SetValue(Page.IconImageSourceProperty, menuItem.Icon); Map = new MapPage <T>(viewModel); List = new ListPage <T>(viewModel) { IconImageSource = "list.png" }; this.Children.Add(Map); this.Children.Add(List); }
public MasterPage(OptionItem menuItem) { var viewModel = new MapViewModel <T>(); BindingContext = viewModel; this.SetValue(Page.TitleProperty, menuItem.Title); this.SetValue(Page.IconProperty, menuItem.Icon); List = new ListPage <T>(viewModel) { Icon = "list.png" }; //we don't want to use the map page //Map = new MapPage<T>(viewModel); //this.Children.Add(Map); this.Children.Add(List); }