Register any platform specific implementations }Īfter we’ve made these changes we need to go to the project properties and change the Output Type from ‘Class Library’ to ‘Windows Application’. Public void RegisterTypes(IContainerRegistry containerRegistry) Public class GtkInitializer : IPlatformInitializer Window.SetApplicationTitle( "Your App Name") Var app = new App( new GtkInitializer()) This is also a good time to add an IPlatformInitializer for your GTK project. Now that you have the needed references you need to add a Program class (or rename the default Class1.cs) with a Main method that loads the Xamarin.Forms and GTK libraries and starts up your app. You want to add a reference to the following DLLs from the GTK# install folder (typically C:\Program Files (x86)\GtkSharp\2.12\lib\gtk-sharp-2.0): Next we need to manually add DLL references to the GTK Sharp library files we installed earlier. In my case, I’m using DryIoc, so I added the following packages: Once the project is added we need to add a reference to Prism, Xamarin.Forms, and the Xamarin.Forms GTK backend. Name the project something useful, in my case Cadi.UI.Gtk and click ok. Go to File->New Project, select Windows Desktop from the tree and choose Class Library (.NET Framework). Now that we have GTK# installed on our machine we need to add a new project to our solution for the GTK backend. Head over to The Mono Project to download and run the GTK# for. Adding the GTK# Backend Projectīefore we can add the GTK# project we need to actually install the GTK# libraries. I’m building it on a RaspberryPi and would really like to use Xamarin.Forms and Prism, so I started out with adding a GTK# frontend to my Xamarin.Forms project. I’m working on project to replace my car radio with a custom digital dashboard.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |