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#?
Asked
Active
Viewed 972 times
1 Answers
1
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#

trampster
- 8,598
- 4
- 37
- 52
-
Thanks for the answer! I already found this beta version, but Xamarin studio does not support it. So how I can use this version of GTK# in my application? I need to compile it using Cygwin or something like this? – konstantin_doncov Dec 02 '14 at 11:09
-
I think the problem is probably the installer, if the GTK2 and GTK3 bindings could be installed in parallel then it probability wouldn't be a problem. I can think of two solutions, one is compiling it yourself, or two use visual studio instead of Xamarin Studio. – trampster Dec 02 '14 at 20:21