private async Task Setup() { // sometimes, the scene is not big enough. we wait completion await Task.Delay(500); if (_app == null && _urhoSurface != null) { if (!Application.HasCurrent) { var applicationOptions = new ApplicationOptions { Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait }; _app = await _urhoSurface.Show <PanoramaApp>(applicationOptions); } else { _app = (PanoramaApp)Application.Current; } UpdateImage(); UpdateFieldOfView(); UpdatePitch(); UpdateYaw(); } }
public void Initialize() { Device.BeginInvokeOnMainThread(async() => { if (_app == null && _urhoSurface != null) { // sometimes, the scene is not big enough. we wait completion await Task.Delay(500); _app = await _urhoSurface.Show <PanoramaApp>(new ApplicationOptions(null) // "Data" { Orientation = ApplicationOptions.OrientationType.LandscapeAndPortrait }); UpdateImage(); UpdateFieldOfView(); UpdatePitch(); UpdateYaw(); } }); }