[MonoDevelop] Swapping UI code between projects in a solution how?

Michael Hutchinson m.j.hutchinson at gmail.com
Thu Sep 18 00:52:44 EDT 2008

On Wed, Sep 17, 2008 at 10:30 AM, alanb <alan.battersby at ntlworld.com> wrote:
> I am using version 2.1 with a solution containing 4 projects. A couple of
> times now I have decided that a widget I placed in one project would be
> better off in another. How do I do this? (I know I should have designed more
> carefully but sometimes you make retrospective changes when it becomes
> apparent that the widget created is more universally applicable.)
>  I can cut and paste the c# code file with no problem but how can I move the
> associated user interface code?

Currently this is non-trivial, but possible. You will have to unload
the project from monodevelop, then find the widget's element in the
source project's gtk-gui/gui.stetic file (don't worry, it's XML, so
not too painful) and copy it and its contents to the target's
gtk-gui/gui.stetic file. When you re-open the project and try to open
the widget (from the "user interface" virtual folder) you will be
asked what class you would like to associate it with.

Hopefully we will be moving to a "one widget per file" model, with
each widget in a visible file, with the associated code files groupeds
as its children. You will then be able to copy the whole group between

This will bring the development model more in line with that of
ASP.NET, XAML and Winforms.

Michael Hutchinson

More information about the Monodevelop-list mailing list