How to get DPI in MonoGame

I can get DPI in System.Drawing.Graphics, but don’t know how to get DPI in MG.

float dpiX, dpiY;
using (Graphics graphics = Graphics.FromHwnd(IntPtr.Zero))
dpiX = graphics.DpiX;
dpiY = graphics.DpiY;

I think it’s in here ?


No, it’s not there.
DPI what I mean is

If this is for windows you can include SharpDX.Direct2D1 and you may try this :

EDIT : SharpDX.Direct2D1.dll is located on your bin files generated by MG and dispose the factory or use the using statement.

  //*>> Direct2D1 Factory
  var m_Factory = new SharpDX.Direct2D1.Factory();

  //*>> Desktop DPI
  var m_DPI = m_Factory.DesktopDpi;