Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aero windows in WPF (C#)

Tags:

c#

window

wpf

aero

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!

like image 507
caesay Avatar asked Feb 04 '10 02:02

caesay


1 Answers

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.

like image 113
Andrew Moore Avatar answered Oct 01 '22 22:10

Andrew Moore