Windows 应用程序默认 UI

发布于 2024-09-19 15:49:24 字数 453 浏览 4 评论 0原文

我已经开始开发一个Windows应用程序,其目标是Windows 7和Vista(也许是XP)。

我想要在默认 Windows 应用程序中找到一些标准行为。 但我找不到任何可以做到这一点的东西,所以我有一些问题:

1)例如,在 Windows 7 上,地址栏显示 Windows 资源管理器中的当前文件夹。有没有办法把它弄到某个地方,或者我必须自己开发它?

2)是否可以将UI元素添加到窗口镶边?我的意思是,如果你检查 Windows 资源管理器,上一个和下一个按钮、地址栏、搜索栏都绘制在窗口标题下方,这是半透明区域。

3) 在哪里可以找到好的 UI 开发教程或文档?我查过谷歌,但找不到可以理解的东西。

4) 像 Windows 资源管理器这样的应用程序是 WPF 应用程序还是 WinForms 应用程序?我认为这两种技术都可以完成,但在 WPF 中执行会更容易,我错了吗?

谢谢。

I've started the development of a windows application, which target windows 7 and vista (maybe XP).

I wanted to have some standard behavior that we find in the default windows applications.
But I can't find anything to do that, so I have some questions :

1) For example, on Windows 7, the address bar that displays the current folder in the Windows Explorer. Is there a way to get it somewhere, or I'll have to develop it myself ?

2) Is it possible to add UI element to the window chrome? I mean, if you check at the Windows Explorer, the previous and next button, the address bar, the search bar are draw below the window title is the translucent area.

3) Where can I find good UI development tutorial, or documentation ? I've checked on google, but I couldn't find something understandable.

4) An application like the Windows Explorer, is a WPF application or a WinForms application ? I think it can be done in both technologies, but will be easier to perfom in WPF, am I wrong?

Thank you.

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

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

发布评论

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

评论(2

我是男神闪亮亮 2024-09-26 15:49:24
  1. 据我所知,资源管理器地址栏功能没有官方控件;还存在一些其他控件/库,例如 Win7 中的功能区和操作任务栏功能。有人可能在自定义库中实现了类似的东西,但我对此一无所知。无论如何,如果使用 WPF,它并不是非常复杂。

  2. 查看将您引导至 MSDN 文章的答案,他们几乎已经涵盖了该内容。

  3. 这有点复杂。并不是 WPF 中的所有内容都可以通过一些快速教程来理解,但我强烈推荐 WPF 博士的这一系列文章 - 虽然其中大多数是关于 ItemsControl 的,但有些文章深入讨论了一般概念,例如外观控件、样式等。我实际上正在尝试思考一些更底层的东西 -水平但我失败了。

  4. 这两种技术绝对可以完成,而且只有您更熟悉的技术才是最简单的。如果你投入时间和精力来精通另一种技术,最终它也会很容易。有了一些 WPF 的经验,我可以肯定地说它更容易,但您首先需要了解一些零碎的东西。它确实与 WinForms 有很大不同。更好的是:P

也就是说,这两种技术都以 .Net Framework 为核心,因此有些东西是相同的;文件和文件夹访问、打开已知类型的文件等都使用相同的类。最大的区别只是 WPF 正确执行(即 MVVM 的某些变体)强制执行数据和表示之间的非常好的分离。当然,它还具有非常强大的绑定基础设施,使数据呈现变得轻而易举。

  1. As far as I know, there's no official control for the Explorer address bar functionality; some other controls/libraries exist, like Ribbon and manipulating taskbar functionality in Win7. Someone may have implemented something similar in a custom library but I have no knowledge of any. Anyway, if using WPF it's not terribly complicated.

  2. See the answer directing you to a MSDN article, they pretty much have it covered.

  3. That's a bit more complicated. Not everything in WPF can be understood from a couple of quick tutorials, but I'd warmly recommend this series of articles from Dr. WPF - while most of them are about the ItemsControl, some go in-depth about general concepts like lookless controls, styles etc. I'm actually trying to think of something more low-level but I fail.

  4. It absolutely can be done in both technologies, and it's only easiest in the one you're more familiar with. If you put time and effort into being proficient in another technology, eventually it will be easy as well. Having some experience with WPF I can definitely say that it's easier, but you need to know some odds and ends first. It's certainly a lot different than WinForms. And better :P

That said, both technologies have .Net Framework at the core so some things will be identical; file and folder access, opening files of known types etc. all use the same classes. The big difference is only that WPF done correctly (i.e. some variation of MVVM) enforces a very nice separation between data and presentation. And of course it also features a very powerful binding infrastructure that makes presenting data a breeze.

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