将 C# 控制台应用程序扩展为 WPF 应用程序

发布于 2024-08-28 20:15:23 字数 122 浏览 4 评论 0原文

将简单控制台应用程序转换为 WPF 的最佳方法是什么?我是一个完全的新手,所以要温柔! 控制台应用程序根据用户选择显示信息..真正简单的东西,但我想在 WPF 中为其创建一个 GUI..并且正在寻找有关如何执行此操作的初始步骤。

What's the best way to convert a simple console application to a WPF? and I am a COMPLETE newb so be gentle!!
The console app displays information according to user choices.. real simple stuff, but I'd like to create a GUI for it in WPF.. and am looking for initial steps on how to go about it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏日浅笑〃 2024-09-04 20:15:23

这个,以及(视频)可能值得一看。他们将帮助您开始构建 WPF 应用程序,但您需要弄清楚如何将现有界面移植到 WPF,这可能不是很直接,因为构建控制台应用程序有很大的转变(Console.WriteLine /Console.Read)和一个带有带有事件和显示属性的 GUI 对象的 GUI 应用程序。

我建议您跳入上面的链接,并在遇到困难时在此处提出其他问题。

This, and this (video) might be worth checking out. They will get you started with building a WPF app, you'll need to figure out how to port your existing interface to WPF though, which might not be very straight forward because there is a large shift in building a console app (Console.WriteLine/Console.Read) and a GUI app with GUI objects with events and display properties.

I recommend jumping in with the links above and positing additional questions here when you get stuck.

临走之时 2024-09-04 20:15:23

首先,您需要考虑新界面的行为方式。 GUI 与控制台交互不同。
在纸上画出你想要的 GUI、按钮、文本区域等。
考虑逻辑和它应该表现出来的行为,即类似于向导、按钮交互等。

只有这样才能在 WPF 中实现,为此请寻找一些初学者教程,例如

First you need to think how the new interface will behave. A gui is different from console interaction.
Draw on paper the gui you want, buttons, text areas, etc.
Think about the logic and it should behave, i.e. wizard like, button interaction, etc.

Only then approach the implementation in WPF, for that look for some beginner tutorial, like ths

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文