Myra - UI Library for the MonoGame

I have the latest version of the MyraUI Editor working. :relaxed:

However, I have to agree with the other poster who is still not finding any actual C# code generated with the export for the controls created.

Another point that should be taken into consideration and should at least be well documented. The properties provided for the grid in terms of the columns and rows are not labeled properly. To define the number of columns and rows the term parts is used such as with ColumnParts. This makes no sense coming from a professional development background. However, since these are existing properties in the API they should at least be provided with some documentation explaining that these properties are used to define the number of columns and rows that the grid will contain.

Again the terms for the properties that are applied to the controls, which determine where they will be placed in the grid are labeled with suffixes as X and Y. Again, from a professional point of view, this indicates pixels\points in a grid coordinate system or an absolute positioning system for controls on a form. Such terms should have been used with the more meaningful term of index. However, since these terms are already in the API, they should be clearly explained in documentation as to how they related to a cell within the grid.

It took me a while of tinkering with the MyraUI Editor to finally understand how these properties work and realize how necessary they are if one is going to set up a complex interface for the game or simulation.

BTW, I meant to ask… The Assets namespace has been dropped in the latest versions of MyraUI. However, objects in my code still require this namespace or a corresponding one.

Which one should be used to replace the Assets namespace?

  1. Myra’s Grid is loosely based on WPF Grid. And latter has similar properties named ColumnDefinitions and RowDefinitions. Though I agree that GridPositionX/GridPositionY should be renamed GridPositionColumn/GridPositionRow. Or maybe even to Column/Row. Or maybe some simple mechanism of attached properties should be implemented. So setting a widget grid position would be same as in WPF:
  Grid.SetRow(widget, 0);
  Grid.SetColumn(widget, 2);

I also agree that Myra lacks documentation. Hopefully it’ll be fixed in future.
And yet Grid is somehow documented:

  1. Could you share exact code that requires Assets?
    Older Myra had AssetManager - alternative to the MonoGame Content Pipeline - which allowed to load direct assets. Its usage looks like following:
var texture = _assetManager.Get<Texture2D>("image.png");

You dont need Assets, unless you have above code somewhere.

C# export had been fixed.
New binary distribution link:

Thanks, everyone, for help and feedback!

Revamed Grid wiki entry:
Now it should be much more helpful.

Myra 0.8.2 is out!
Two major features had been added:

  • New Widget: TabControl

  • Support for Xenko Engine

New binary distribution link:

Myra Project Site:


Hi Roman…

Sorry for not replying earlier but I have been with other projects in the past few weeks. As to the Assets issue I had asked about…

If I simply comment out the using clause at the top of my “MainGame.cs” class (Game1.cs), the application compiles and runs without any issues. However, if I upgrade to the latest Myra version, the application coughs up a compile issue say that it is missing the Assets library.

I found the exact issue I have been having with the Assets library… Here is the code that is causing the problem…

coBitmapFont = Myra.DefaultAssets.Font;

My Myra General Info Display relies on this font… What is the replacement then???

Hi Steve,
Older Myra DefaultAssets’ Font had MonoGame.Extended.BitmapFont type. Today Myra.DefaultAssets.Font type is ordinary Microsoft.Xna.Framework.Graphics.SpriteFont:

So probably you need to change type of coBitmapFont to SpriteFont.

I got the font working and my version of Myra upgraded to the latest version you just released… :relaxed:

Probably wasn’t really concentrating earlier when I was having trouble… :disappointed_relieved:

1 Like

Myra 0.8.3 is out.
I’ve finally removed Newtonsoft.Json dependency. So new Myra doesnt have any external dependencies.


Myra 0.8.5 is out.
StbTextEditSharp and TextCopy libraries had been integrated in the Myra.
Which resulted in the many new features for the TextField widget(clipboard operations, undo/redo, cursor movements, etc.).


Link to the new binary distribution(it contains Notepad sample, which is demonstrated on the animated gif):

1 Like

Myra 0.8.6 is out.
New UI design tool called MyraPad had been added to the project(click on the below animated gif to see it in action):

New binary distribution:

Myra project site:


Love it, but ts there a forum or community for discussing Myra? I cannot figure out how to re-scale the bounds of my Combobox.

Open Myra project site
Open “Issues”
Ask a question.
The developer will well answer :))

Another way is to join official MG discord:
I hang there most of the time.

1 Like

btw, following wiki entry lists layout properties of a widget:

Myra 0.8.7 is out.
MyraPad had gained a new feature - tag auto-completion:

Link to the new binary distribution(which contains MyraPad):

Myra Project Site:

1 Like

Myra 0.8.8 is out.
No new features, just bug fixes.

1 Like

Myra(UI Library for MonoGame, FNA and Xenko) 0.9 is out.
That is another stabilization release without new features, but with many bug fixes.
Also MyraPad had become primary UI design tool:

Important. Button had been renamed to ImageTextButton.

1 Like

Myra 0.9.1 is out.
The only new feature is the ellipsis in the TextBlock widget.
Also Myra has two major API changes:

  1. Now texture atlases and stylesheets use xml instead of json. Binary release contains two new utilities to convert old format to new.
  2. Rectangle Desktop.Bounds property had been replaced with Func<Rectangle> Desktop.BoundsFetcher, which is initially set to Func returning the entire screen(Destkop.DefaultBoundsFetcher).
    So code like:
  _desktop.Bounds = new Rectangle(0, 0, GraphicsDevice.PresentationParameters.BackBufferWidth,	

should be removed from the apps using Myra.