For XNA: normal
For FNA: when resize window by mouse, it will be auto center.
Test case:
using Microsoft.Xna.Framework;
using System;
namespace ConsoleApp2
{
public static class Program
{
[STAThread]
private static void Main(string[] args)
{
using (FNAGame g = new FNAGame())
g.Run();
}
}
class FNAGame : Game
{
GraphicsDeviceManager gdm;
internal FNAGame()
{
gdm = new GraphicsDeviceManager(this);
Window.AllowUserResizing = true;
}
protected override void Draw(GameTime gameTime)
{
base.Draw(gameTime);
if (gdm.PreferredBackBufferWidth != gdm.GraphicsDevice.Viewport.Width || gdm.PreferredBackBufferHeight != gdm.GraphicsDevice.Viewport.Height)
{
gdm.PreferredBackBufferWidth = GraphicsDevice.Viewport.Width - 1;
gdm.PreferredBackBufferHeight = GraphicsDevice.Viewport.Height - 1;
gdm.ApplyChanges();
}
}
}
}
For XNA: normal
For FNA: when resize window by mouse, it will be auto center.
Test case: