private async void Init() { GlobalDataViewModel thisMod = new GlobalDataViewModel(new GlobalDataLoaderClass(this), this); await thisMod.InitAsync(); DataEntryHelper helps = new DataEntryHelper(thisMod); BindingContext = thisMod; if (thisMod.MainNickName == "") { helps.AddNormalTextRow("Main Nick Name", nameof(GlobalDataViewModel.MainNickName)); } else { helps.AddNormalTextRow("Secondary Nick Name", nameof(GlobalDataViewModel.SecondaryNickName)); } helps.AddNormalTextRow("Azure End Point", nameof(GlobalDataViewModel.AzureEndPointAddress)); helps.AddNormalTextRow("Local Address", nameof(GlobalDataViewModel.HostIPAddress)); helps.AddButton("Home Hosting", nameof(GlobalDataViewModel.ChangeServerOptionsCommand), EnumServerMode.HomeHosting); helps.AddButton("Azure Hosting", nameof(GlobalDataViewModel.ChangeServerOptionsCommand), EnumServerMode.AzureHosting); helps.AddButton("Local Hosting", nameof(GlobalDataViewModel.ChangeServerOptionsCommand), EnumServerMode.LocalHosting); helps.AddButton("Host In App", nameof(GlobalDataViewModel.ChangeServerOptionsCommand), EnumServerMode.MobileServer); helps.AddButton("Default Azure EP", nameof(GlobalDataViewModel.DefaultAzureCommand)); helps.AddButton("Clear Azure", nameof(GlobalDataViewModel.ClearAzureCommand)); helps.AddLabelRow("Current Nick Name", nameof(GlobalDataViewModel.CurrentNickName)); helps.AddLabelRow("Server Hosting Option", nameof(GlobalDataViewModel.ServerMode), new ServerConverter()); helps.AddButton("Save Settings", nameof(GlobalDataViewModel.SaveCommand)); helps.AddButton("Use Main Nick Name", nameof(GlobalDataViewModel.MainNickCommand)); ScrollView scroll = new ScrollView(); scroll.Orientation = ScrollOrientation.Both; //try both this time. scroll.Content = helps.CurrentGrid; Content = scroll; }