An iOS and Android app built in Xamarin.Forms, demontstrating the the Syncfusion.Xamarin.SfAutoComplete NuGet Package.
Note: Syncfusion can be used for Free via its Community License.
- In Visual Studio, add the Syncfusion.Xamarin.SfAutoComplete NuGet Package to your iOS project, Android project and .NET Standard Project (if applicable).
- In the iOS Project, open
AppDelegate.cs
- In the
AppDelegate.cs
file, inAppDelegate.FinishedLaunching
method, addnew Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();
, like so:
[Register(nameof(AppDelegate))]
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
{
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
return base.FinishedLaunching(app, options);
}
}
Here is an example of a Xamarin.Forms app using Syncfusion.Xamarin.SfAutoComplete:
using System.Collections.Generic;
using Syncfusion.SfAutoComplete.XForms;
using Xamarin.Forms;
namespace AutoCompleteSample
{
public class App : Application
{
public App() => MainPage = new AutoCompletePage();
}
class AutoCompletePage : ContentPage
{
public AutoCompletePage()
{
Content = new SfAutoComplete
{
HeightRequest = 40,
AutoCompleteSource = new List<string>
{
"Edge",
"Firefox",
"Chrome",
"Opera",
"Safari",
}
};
}
}
}