// Define a storyboard object UIStoryboard storyboard = UIStoryboard.FromName("Main", null); // Instantiate the initial view controller UIViewController initialViewController = storyboard.InstantiateInitialViewController() as UIViewController; // Set up navigation controller and root view controller UINavigationController navigationController = new UINavigationController(initialViewController); Window.RootViewController = navigationController;
// Define a storyboard object UIStoryboard storyboard = UIStoryboard.FromName("Main", null); // Instantiate the view controller you want to present UIViewController viewControllerToPresent = storyboard.InstantiateViewController("ModalViewController") as UIViewController; // Set up presentation style and present the view controller viewControllerToPresent.ModalPresentationStyle = UIModalPresentationStyle.OverCurrentContext; PresentViewController(viewControllerToPresent, true, null);The UIStoryboard class is included in the Xamarin.iOS package library, which is a cross-platform development tool that allows developers to create iOS, Android, and Windows 10 apps using C#.