i want to mix UI with custom drawn stuff in MonoGame. In this case i have an inventory screen where i want the backround (grids, images, texts) to be designed in xaml. The items itself should be rendered in game with spritebatch. The problem is i want another layer of UI on top of my custom item render pass. In this case an info overlay box thingy.
My first idea was to try to create an image in xaml and set a renderTarget as source using:
itemImage.Source.Texture = Engine.Instance.Renderer.CreateTexture(itemRenderTarget);
This works fine with normal Texture2D instances but it doesn't seem to work with renderTargets. Even if it would work i don't know if its a good idea to do this every frame in a game.
Is there any other solution to achieve different "layers"?