How can I use CSS styling in my GTK# application?
How can I use CSS styling in my GTK# application? I heard before that it is impossible to use CSS themes in GTK#, but after that I found this example of using css styling in GTK#. Besides this I found also the samples of using CSS styling in Banshee project (which uses GTK#). So how is it possible? I already tried to do the same in GTK#, but I didn't find CssProvider class. So how I can find this class in GTK# or how I can using CSS styling in GTK#?
CSS Styling is a GTK3 feature.
GTK# for GTK3 is not released as stable yet.
Xamarin (the main force behind mono) have publicly announced that their product (Xamarin Studio/Mono Develop) will not be moving to GTK3. This means that GTK3 support must come from the community and as a result has been very slow in coming.
It is likely that you cannot find the CssProvider class because you are using the GTK2 bindings not the GTK3 bindings.
If you would like to try the beta GTK3 csharp bindings then you can find them here: https://github.com/mono/gtk-sharp/releases
Because Xamarin Studio will not work with GTK3 I would recommend either:
- Compiling GTK# yourself such that Xamarin Studio can continue to run on the installed GTK2 bindings.
- Use Visual Studio which has no dependency on GTK#