Importing and using InputKit is easy as possible. It's plug & play logic. Just add to your project and use it.
No more Init(); methods for your each platform !
This plugin 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.
- Right Click to your solution and go Manage NuGet Packages.
- Find and Install Plugin.CurrentActivity from NuGet to your only Android Project!
- Add following code to OnCreate method of your MainActivity in Android Project.
//...
base.OnCreate(savedInstanceState);
CrossCurrentActivity.Current.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.
Nothing more. Just Plug & Play!
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"/>