Is there a way to get textboxes, labels and other wpf controls in xna that supports margins, etc that flexes for window size?
5 Answers
You might give CeGui a shot.
If your game needs advanced GUI capabilities, CeGui# might just hit the nail on the head for you. Marketese aside, this is a seriously good GUI library with Buttons, ListBoxes, Scrollbars, ProgressBars, Sliders, ComboBoxes and more.
To access the Xna version you'll need to check out the latest copy from the project's SVN and load up CeGui-XNA.sln
.
There are other options listed in this thread, but I have no idea how well any of the others work (and it probably isn't a comprehensive list anymore).

- 6,417
- 3
- 30
- 31
-
1Yea, looks like i'm going to have to go with a 3rd party library for now. I'm using neoforce, found here http://www.tomshane.cz/neoforce/default.aspx – Shawn Mclean Oct 14 '09 at 04:40
-
That's looking pretty nice - and actively developed! – Ryan Versaw Oct 14 '09 at 06:08
-
It looks like this project has been renamed to Nuclex.Userinterface. The link to CeGui redirects to http://nuclexframework.codeplex.com/wikipage?title=Nuclex.UserInterface – Daniel Plaisted Jan 13 '11 at 06:38
The official GUI systems FAQ thread in the XNA Forum: What GUI systems are there for the XNA framework?
CEGUI# is powerful, but it doesn't support the Xbox 360 (eg. its design doesn't include responding to game pad input) - a major overhaul would be required to refit it to be usable with something else than mouse and keyboard.

- 9,444
- 8
- 42
- 50
Not exactly what you're looking for, but here is an example of getting winforms GUI elements mixed in with XNA 3d content:

- 3,996
- 7
- 44
- 53
Check out SQUID: http://www.ionstar.org/
It's a really clean, fast, and engine independent UI system. I've worked with it extensively and really enjoy using it. The download includes sample code for XNA 3.1, Truevision3D, and SlimDX.

- 91
- 1
- 3
It is possible to embed an XNA game in a WPF form (google: XNA in WPF) if you target only Windows system. You will then have access to all the controls available in XPF for your 2D GUI.
If you also target Xbox 360 or Zune; you must make your own GUI library :(

- 900
- 7
- 14
-
My own GUI library? Piece of cake! Those things can be finished in an afternoon! ;) – Greg D Oct 13 '09 at 17:11
-
:) I should add : or use a third-party one. ex: http://www.youtube.com/watch?v=mg9FRFbvte4 – Jodi Oct 14 '09 at 12:38