MGUI - a user-interface framework for MonoGame

I’d like to share a UI framework I’ve been working on. Take a look:

Brand new but it has a lot of features and I think it’s already pretty close to what you might expect from a polished framework. Supports just about every control you’d expect: checkbox, button, listbox, radiobutton, contextmenu, expander, tabcontrol, combobox, stackpanel, dockpanel, grid, progressbar, textbox, slider etc…

If you’re using Windows OS, it also supports parsing from a simplified form of XAML markup (Windows-only because it uses System.Xaml.XamlServices.Parse for these features).

For example here’s a dialog created with MGUI controls:
Sample_Registration_Window

I’m still working on the look and feel. Haven’t really decided on a default color-palette yet but for now it’s using some dark blues, light blues, and shades of black for the most part

5 Likes

Added a simple XAML Designer window so you can quickly test your markup at runtime:

MGUI XAML Designer

1 Like

Been a while since I posted in here. MGUI has improved a lot since then, way too many improvements to list!

Here’s a fun little UI I made earlier today to showcase some of what you can do with MGUI:

Sample_FF7Inventory_Window

It’s about 140 lines of XAML and around 250 lines of c# code

I also finally got around to adding some documentation on the MGUI Wiki page. Mostly just some beginner-level stuff but eventually there will be a lot more.

Added some new controls like a ChatBox. Made a ton of improvements to the text rendering to support a lot more inline formatting. Added Themes that let you easily play around with some different color palettes and fontsizes etc. Fixed a lot of obscure bugs. Lots of improvements to how the Grid container arranges its children, things like RowSpan, ColumnSpan, support for MinWidth/MaxWidth on columns, MinHeight/MaxHeight on rows, GridSplitters, grid lines, selections etc (some documentation here). Added support for nested child windows, Modal or Modeless. Added support for Window scaling (though it’s kind of ugly because the text scales poorly). And just a whole bunch of little changes, bugfixes, new properties, XAML improvements (finally got around to adding some really basic data binding. It’s only being used inside of ListBox.ItemTemplate and ComboBox.DropdownItemTemplate/ComboBox.SelectedItemTemplate right now but I hope to keep improving it and have some actual support for DataContexts and 2 way bindings eventually)

1 Like

MGUI is pretty stable, might release version 1.0 soon. You can use XAML on non-Windows platforms now thanks to Portable.Xaml nuget package. I finished my DataBinding engine so you can do things like TwoWay bindings, bind to specific named Elements, use Converters, StringFormat, FallbackValues etc. It’s pretty powerful now. Lots of little improvements and I’ve added a bunch of samples and documentation.

5 Likes

Nice job on this! This is exactly what I have been looking for. It was super easy to get this up and running for a POC!