屏幕大小调整C#2010

屏幕大小调整C#2010,c#,xna,height,width,screen,C#,Xna,Height,Width,Screen,我可能只是缺少了一些东西,但当我尝试使用时:System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width或graphicsDevice.PresentationParameters.BackBufferWidth,我无法使用这些 我可能在内容加载器上遗漏了一些可以调用的内容: using System; using System.Collections.Generic; using System.Linq; using System.Text; u

我可能只是缺少了一些东西,但当我尝试使用时:
System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width
graphicsDevice.PresentationParameters.BackBufferWidth,我无法使用这些

我可能在内容加载器上遗漏了一些可以调用的内容:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content;

您可以使用GraphicsDeviceManager进行更改

    public Game1()
    {
        graphics = new GraphicsDeviceManager(this);
        graphics.PreferredBackBufferHeight = 1080;   //Height
        graphics.PreferredBackBufferWidth = 1920;  //Width
        graphics.IsFullScreen = true;    //Fullscreen On/off
        graphics.ApplyChanges();   //Execute Changes!!!IMPORTANT!!!
        //if you want use/change the PresentationParameters.BackBufferWidth, you could do it with the GraphicsDevice which could be found in the GraphicsDeviceManager Class
        graphics.GraphicsDevice.PresentationParameters.BackBufferWidth;
    }

先生,谢谢您提供的信息,您能告诉我更多关于如何调整图像大小以适应全屏幕的信息吗?