对于具有多个窗口的 WPF 仪表板类型的应用程序来说,什么是好的 UI 方法?

发布于 2024-08-16 15:29:06 字数 311 浏览 7 评论 0原文

我正在为一家小型企业开发 WPF 桌面应用程序。它将有一个带有 4 个按钮的仪表板,应显示相应的窗口/表单。

示例 -

  1. 管理条目
  2. 管理
  3. 报告
  4. 帮助

每个都有一个单独的表单,其中包含大量控件和内容。

是否最好将每个窗口作为单独的窗口(包括仪表板)并在单击仪表板中的按钮时显示它们?

或者是否可以只有一个窗口,顶部有这 4 个按钮,并根据按钮交换下面的内容?

我对 WPF 应用程序有点陌生,所以我不知道什么是可能的以及什么是最佳实践。

I am developing a WPF desktop app for a small business. It will have a dashboard with 4 buttons that should show a corresponding window/form.

Examples -

  1. Manage Entries
  2. Admin
  3. Reports
  4. Help

Each of these has a separate form with lots of controls and stuff.

Is it best to have each of these as a separate window (including dashboard) and show them when a button is clicked in the dashboard?

Or is it possible to have just one window with these 4 buttons on top, and swap the contents below depending on the button?

I am kind of new to WPF apps so I don't know whats possible and what is the best-practice.

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

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

发布评论

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

评论(2

久光 2024-08-23 15:29:06

您会发现,从 UI 角度来看,WPF 几乎一切皆有可能。

绝对有可能拥有一个窗口并根据按钮交换下面的内容。我喜欢的一个模式是 PRISM,它有一些有趣的模式和在 WPF 和 Silverlight 中实现复合窗口的最佳实践。

您还可以查看 MVVM 模式,它在 WPF 中变得非常流行。 乔什·史密斯有许多伟大的作品这方面的文章。

另外,如果您确实是新手,请查看“用户控件”,因为这使您可以轻松地模块化某些部分。

我自己发现,在我的前几个 WPF 应用程序中,我是从 Winform 的思维方式来处理它的 - 但在真正重新审视 Binding 后,这些其他模式才真正开始大放异彩。

What you will find with WPF is nearly anything is possible from a UI perspective.

It is definitely possible having one window and swapping the contents below depending on the button. A pattern I like is PRISM which has some interesting patterns and best practices on achieving composite windows in both WPF and Silverlight.

You could also look at the MVVM pattern, which is becoming really popular with WPF. Josh Smith has many great articles for this.

Also, if you are really new, have a look as User Controls, as this allows you to easily modularize certain sections.

What I found with myself was with my first few WPF applications, I approached it from a Winform's mindset - but then after really getting a second look at Binding, these other patterns really began to shine.

等数载,海棠开 2024-08-23 15:29:06

一种最佳实践方法是使用复合应用程序指南。基本上,它是一种应用程序设计方法,包含一个外壳和排列在其中的多个视图。微软通过CodePlex发布了一个名为Prism的CAG库,并在MSDN上为其提供了教程和文档。

CodePlex 链接:复合 WPF 和 Silverlight

MSDN 链接:复合客户端应用程序指南

One best-practice approach is to use Composite Application Guidance. Basically it is an application design approach which contains a shell and multiple views which are arranged inside it. Microsoft has released a CAG library called Prism through CodePlex, and has provided tutorials and documentation for it on MSDN.

CodePlex Link: Composite WPF and Silverlight

MSDN Link: Composite Client Application Guidance

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