public Page CreateDefaultMainPage() { var layout = new StackLayout { BackgroundColor = Color.Red }; layout.Children.Add(new Label { Text = "This is master Page" }); var master = new ContentPage { Title = "Master", Content = layout, BackgroundColor = Color.SkyBlue, Icon = "menuIcon" }; master.On <iOS>().SetUseSafeArea(true); var mdp = new MasterDetailPage { AutomationId = DefaultMainPageId, Master = master, Detail = CoreGallery.GetMainPage() }; master.Icon.AutomationId = "btnMDPAutomationID"; mdp.SetAutomationPropertiesName("Main page"); mdp.SetAutomationPropertiesHelpText("Main page help text"); mdp.Master.Icon.SetAutomationPropertiesHelpText("This as MDP icon"); mdp.Master.Icon.SetAutomationPropertiesName("MDPICON"); return(mdp); }