[Mono-winforms-list] Drawing in a winform using Gtk C# in Xamarin Studio
Stifu
stifu at free.fr
Tue Jul 7 19:43:08 UTC 2015
I can confirm you're working on a GTK# project and not on a WinForms one.
Mono can run WinForms apps (with some bugs), but doesn't have a WinForms
designer. So if you wanna build a WinForms app with a GUI designer, you'd
need to do it from Windows using Visual Studio or SharpDevelop.
If you wanna build a desktop app from Xamarin Studio with a GUI designer, I
think GTK# is your only choice. Note that there's another interesting GUI
toolkit: XWT (https://github.com/mono/xwt), but it still doesn't have a
designer either if I'm not mistaken.
Anyway, I've never used GTK#, so can't help you with it. But I found this
after a quick search, which might be useful:
http://stackoverflow.com/questions/9113069/how-to-use-gdk-library-in-c-sharp-mono
RoboPi wrote
> Thanks for the quick reply. Unfortunately I'm new to all of this and I
> don't know what I'm doing so I'll try to explain
> I'm running Windows 7.I downloaded Monodevelop Xamarin StudioWhen I start
> a project I choose New SolutionFrom there I chose .NET and Gtk# 2.0
> ProjectI then select MainWindow.cs opened with Window Designer
> I get a form to design and create code for the objects I place on the
> form.
> When I run the program I get a "Window" that contains all my buttons, etc.
>
> So that's where I'm at.
>
> I've placed a "DrawingArea" object (or widget?) from the toolbox onto the
> form.
>
> Now I would like to draw to that drawing area.
>
> So I need to find some documentation or tutorials on how to do that.
>
> That's where I'm at.
>
> So what am I using here? Is this a Gtk C# window? Or a Winform?
> And can I use a standard Windows form in this studio? I used to have
> Microsoft C# studio and I could draw to a windows forms pretty easily.
> But it doesn't seem to work the same in the Monodevelop Xamarin studio.
>
> I just need to get past this graphics problem and I can get on with
> writing my code to draw the simulations I want to program.
>
> I just can't figure out how to draw to the "DrawingArea" object, or
> widget?
> I've been looking for a tutorial on how to do that and I couldn't find
> one.
>
> Thanks
> From: Stifu [via Mono] <
> ml-node+s1490590n4666295h93 at .nabble
> >
> To: RoboPi <
> antiquecraftsman@
> >
> Sent: Tuesday, July 7, 2015 12:09 PM
> Subject: Re: Drawing in a winform using Gtk C# in Xamarin Studio
>
> Hello,
>
> You should either use WinForms or GTK#, not both.
> If you want to use WinForms, then you should draw using GDI+, the same way
> you would in .NET.
> If you want to use GTK#, then you should draw using GDK
> (http://docs.go-mono.com/?link=T%3aGdk.Pixbuf).
>
>
> RoboPi wroteHello,
>
> I'm looking for help or tutorials on how to draw to a drawingarea on a
> Windows Form using C# in Xamarin Studio. I just need to draw simple
> shapes, line, rectangles, circles, and be able to fill them in with color.
>
> A simple sample code would be great.
>
> I haven't been able to find anything on YouTube or Google.
> Any help will be greatly appreciated.
> Thank you,
> James
>
>
> If you reply to this email, your message will be added to the
> discussion below:
> http://mono.1490590.n4.nabble.com/Drawing-in-a-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p4666295.html
> To unsubscribe from Drawing in a winform using Gtk C# in Xamarin Studio,
> click here.
> NAML
--
View this message in context: http://mono.1490590.n4.nabble.com/Drawing-in-a-winform-using-Gtk-C-in-Xamarin-Studio-tp4666294p4666299.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.
More information about the Mono-winforms-list
mailing list