public static void SetInternalGraphicsToNull(this XGraphics gfx)
 {
     gfx.GetType().GetField("_gfx", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).SetValue(gfx, null);
 }