-
Notifications
You must be signed in to change notification settings - Fork 101
Getting Started
Enis Necipoglu edited this page May 4, 2021
·
7 revisions
Importing and using InputKit is easy as possible. Just follow steps below;
This plugin is published on NuGet to much more quicker implementation. This instructions uses nuget option.
- Right Click to your solution and go Manage NuGet Packages.
- Type to searchbar Xamarin.Forms.InputKit and find that package.
- Choose all platforms you want to use and click the Install button.
If you use it on Android platform there is just one more step.
- Add following code to OnCreate method of your MainActivity in Android Project.
//...
base.OnCreate(savedInstanceState);
Plugin.InputKit.Platforms.Droid.Config.Init(this,savedInstanceState); // < ---- Add here
LoadApplication(new App());
//...
Controls in InputKit uses current android activity to make some actions like open dropdown menu, changing color of icons,... etc.
REMINDING: If you're using 2.X.X version and renderers doesn't work, try apply these steps.
- Just go your AppDelegate.cs and find FinishedLaunching method.
Add
Plugin.InputKit.Platforms.iOS.Config.Init();
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
global::Xamarin.Forms.Forms.Init();
LoadApplication(new App());
// This Initalization works only v.3.0.0-pre2 and above
Plugin.InputKit.Platforms.iOS.Config.Init(); // < --- Add here
return base.FinishedLaunching(app, options);
}
This platform is Experimental. Some of features may not work! It's not recommended to release your projects with InputKit on UWP platform.
But if want a try. No more code needed on UWP too.
- Go to your XAML page and add following xml namespace to your ContentPage tag as like this sample
xmlns:input="clr-namespace:Plugin.InputKit.Shared.Controls;assembly=Plugin.InputKit"
See how it should be done at sample
- Then use it at wherever you want in your page with defined prefix
input
like following code:
<input:CheckBox Text="Option 5" IsChecked="True" Type="Material"/>