c# - 在 WPF 应用程序中使用 Xbox 360 Controller

标签 c# wpf xbox360

我目前正尝试在我的 WPF 应用程序中使用我的 Xbox 360 Controller ,但所有在线教程都提到在游戏环境中使用 XNA。我只是想知道是否可以轻松地让我的应用程序检测我的 Xbox 360 Controller 以及可能来自它的任何移动/按钮按下。我当前的设置是 visual studio 2010、.NET 4.0、WPf、C#,并且我有用于 PC 的 xbox 360 无线适配器。谢谢!

最佳答案

考虑 [Bruno Silva 将 Xbox 360 游戏 handle 与 PowerPoint 集成的解决方案][x]。第一个项目是用于 Powerpoint 的 Office 加载项,但基础项目是一个包装器,允许在 Windows 或 WPF 应用程序中使用游戏 handle 。

It wraps XNA Microsoft.Xna.Framework.Input.GamePad class and provides an interface with events associated with each button status change, as well as on game pad connect/disconnect.

[Bruno Silva 的博客有指向项目和示例代码的链接][x]。

您需要安装 XNA Framework 2.0。我不确定更高/最近的版本是否兼容。

关于c# - 在 WPF 应用程序中使用 Xbox 360 Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3348620/

相关文章:

wpf - Mouse.Capture 是什么意思?

c# - 是否需要同步 .NET SerialPort 写入/读取?

c# - 命名空间中不存在 Unity 5.3.3 UI

c# - 如何在 WPF Mvvm 中检索动态生成的 RadioButtons 的选定 RadioButton

c# - ControlTemplate.Triggers 中具有多重绑定(bind)的 multidatatrigger

wpf - 使用WPF如何定义一个样式来设置所有控件的TextOptions.TextFormattingMode?

testing - 在进行 XNA 开发时,有没有一种方法可以验证代码是否可以在 360 上运行?

c# - XNA C# Controller 输入结构

Kinect 手势识别

c# - Html.DropDownList 所选值不起作用(将构造函数与 IEnumerable<SelectListItem> 一起使用)