WPF 中的 Aero 窗口 (C#)

发布于 2024-08-20 08:34:43 字数 108 浏览 5 评论 0原文

我想实现一个Window,就像较新版本的 IE 在 Vista/7 aero 中封装了 URL 栏一样。我环顾四周,没有找到太多有用的信息,想知道你们中是否有人知道最好的方法!

I'd like to implement a Window much like how the newer versions of IE have the URL bar kind of incased in the Vista/7 aero. I've looked around and not found too much useful information, and was wondering if any of you guys knew of the best way to do it!

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

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

发布评论

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

评论(1

睫毛上残留的泪 2024-08-27 08:34:43

Microsoft 创建了 Windows API 代码包,以便提供对 Vista 和 Windows 7 中 API 功能的访问 该库

版本 (v1.0.1) 支持的各个功能包括:

  • Windows 7 任务栏
    • 跳转列表、图标叠加、进度栏、选项卡式缩略图和缩略图工具栏
  • Windows Shell
    • Windows 7 库
    • Windows Shell 搜索 API 支持
    • 资源管理器浏览器控件
    • Shell 命名空间实体的层次结构
    • Windows Shell 属性系统
    • 拖放外壳对象
    • Windows Vista 和 Windows 7 通用文件对话框,包括自定义控件
    • 已知文件夹和非文件系统容器
  • DirectX
    • Direct3D 11.0、Direct3D 10.1/10.0、DXGI 1.0/1.1、Direct2D 1.0、DirectWrite、Windows 成像组件 (WIC) API
  • Windows Vista 和 Windows 7 任务对话框
  • 传感器平台 API
  • 扩展语言服务 API
  • 电源管理 API
  • 应用程序重新启动和恢复API
  • 网络列表管理器 API
  • 命令链接控制和系统定义的 Shell 图标

(有趣的是,DWM 未列出,但属于代码包的一部分)。

要支持 Aero Glass,您所要做的就是让您的 WPF Window 继承 Microsoft.WindowsAPICodePack.Shell.GlassWindow 类。

有关更详细的使用示例,请参阅代码包附带的 AeroGlass 示例。

Microsoft created the Windows API Code Pack in order to provide access to API features form Vista and Windows 7.

The individual features supported in this version (v1.0.1) of the library are:

  • Windows 7 Taskbar
    • Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars
  • Windows Shell
    • Windows 7 Libraries
    • Windows Shell Search API support
    • Explorer Browser Control
    • A hierarchy of Shell Namespace entities
    • Windows Shell property system
    • Drag and Drop for Shell Objects
    • Windows Vista and Windows 7 Common File Dialogs, including custom controls
    • Known Folders and non-file system containers
  • DirectX
    • Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, Windows Imaging Component (WIC) APIs
  • Windows Vista and Windows 7 Task Dialogs
  • Sensor Platform APIs
  • Extended Linguistic Services APIs
  • Power Management APIs
  • Application Restart and Recovery APIs
  • Network List Manager APIs
  • Command Link control and System defined Shell icons

(Interestingly enough DWM isn't listed but is part of the Code Pack).

All you have to do to support Aero Glass is to have your WPF Window inherit Microsoft.WindowsAPICodePack.Shell.GlassWindow class.

See the AeroGlass sample provided with the Code Pack for a more detailed usage example.

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