学习 WPF...全屏启动器应用程序
我正在构建家庭影院 PC (HTPC),并认为这可以为我提供一个小项目来了解有关 WPF 的更多信息。
我想构建一个简单的程序启动器。 这将是一个用我选择的背景填充屏幕的应用程序,以及一些代表应用程序的大图标/按钮。 我有一个红外遥控器,将被设置为模拟击键,因此我可以使用“键盘”在大按钮之间移动并“单击”其中一个按钮,启动一个程序。
我想使用与 exe 位于同一文件夹中的某种外部配置文件和图像文件来定义我的按钮信息、图像和背景。
我一直在使用 VB 在 VS2008 中尝试这个想法,但我已经陷入了仅仅试图让外部图像文件出现在按钮上的困境。 我找到的许多示例都相对复杂,并且是用 C# 编写的,但我是用 VB 工作的。 如果有人对克服这个障碍有建议,或者对我应该如何处理应用程序的其他部分有想法,欢迎您提出意见。
谢谢!
I'm in the process of building a Home Theatre PC (HTPC), and figured this could give me a small project to learn some more about WPF.
I want to build a simple program launcher. It would be an application that would fill the screen with a background of my choosing, and a few large icons/buttons to represent applications. I have an IR remote that will be set up to emulate keystrokes, so I can use the "keyboard" to move between the large buttons and "click" one of them, launching a program.
I'd like to define my button info, images, and background using some kind of external config file and image files in the same folder as the exe.
I've been playing around with the idea in VS2008 using VB but already I'm getting stuck with just trying to get an external image file to appear on a button. Many of the samples I find are relatively complicated and are written in C#, but I work in VB. If anyone has suggestions for getting over this hurdle or ideas on how I should approach other parts of my application, your input is welcome.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试完成本系列:
针对 Visual Basic 的 WPF 和 XAML 的初步介绍程序员
Try working your way through this series:
A First Introduction to WPF and XAML for Visual Basic Programmers
第一个答案中推荐了很好的介绍 - 如果您想更深入地了解一下 WPF - 如何以及为何
Good intro recommended in the first answer - if you want to go a bit deeper have a look at WPF - how and why