public static float DPIScale(this Control control) { try { if (control != null) { return(control.CreateGraphics().DpiX / 96.0f); } else { return(GDI.Graphics().DpiX / 96.0f); } } catch { return(1); } }
public static float DPIScale() { return(GDI.Graphics().DpiX / 96.0f / (UIStyles.FontSize / 12.0f)); }
public static float DPIScale() { return(GDI.Graphics().DpiX / 96.0f); }