Add Navigation Controls to the Xamarin.Forms Solution
- 2 minutes to read
This topic explains how to integrate the DevExpress Navigation components into a Xamarin.Forms cross-platform solution.
Important
The DevExpress Navigation components are available for the iOS and Android platforms. A Xamarin.Forms solution can reference them when the solution uses the .NET Standard code sharing strategy.
Add the following assembly references to your Xamarin.Forms solution’s projects:
Project
Assembly
<YourAppName>
(A .NET Standard project that contains the shared code)
DevExpress.XamarinForms.Core.dll
DevExpress.XamarinForms.Navigation.dll
<YourAppName>.Android
(A project that contains the Android-specific code)
DevExpress.XamarinForms.Navigation.Android.dll
DevExpress.Xamarin.Android.Navigation.dll
<YourAppName>.iOS
(A project that contains the iOS-specific code)
DevExpress.XamarinForms.Navigation.iOS.dll
DevExpress.Xamarin.iOS.Navigation.dll
Note
Confirm that the downloaded <DevExpress.Xamarin> bundle has been unzipped. These files are in the <DevExpress.Xamarin bundle>/Binaries directory in this case.
Note that iOS-specific project requires that you initialize the Navigation Component. To do this, add code below before the LoadApplication method call in your iOS project’s AppDelegate.cs file:
DevExpress.XamarinForms.Navigation.Navigation.Init();
Add the following namespace to an XAML markup or C# file in which you use navigation elements:
Create a Tab View instance. You can do this in XAML markup or C# code:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:ChartsExample" x:Class="ChartsExample.MainPage" xmlns:dxn="clr-namespace:DevExpress.XamarinForms.Navigation;assembly=DevExpress.XamarinForms.Navigation"> <dxn:TabView> </dxn:TabView> </ContentPage>
The Getting Started section provides examples with instructions on how to use navigation controls in your applications.