Tag: wpf

  • Native Tooltips in WPF (Part 2)

    View source on GitHub. In part 1 of this article I looked at the differences between WPF tooltips and ‘native’ (Win32) tooltips. In this part I present a sample WPF application that displays native tooltips. I’d planned to walk through some of the code here, but that turned out to be a bit tedious, so…

  • Native Tooltips in WPF (Part 1)

    View source on GitHub. <preamble> One of my hobbies is getting WPF controls to look more like their native counterparts. I’ve been shoehorning the UxTheme APIs (and older equivalents when theming is unavailable) into something that can be used by WPF over the past year or more, and I’ll write about this process at some…

  • WPF ToolTip Drop Shadows in Windows 8

    The standard ToolTip control template for the Windows 8 theme in WPF (‘Aero2’) has no drop shadow, whether or not the HasDropShadow property is set. The background colour and margins are also slightly off compared to the native style. The following template produces a result that’s closer to the real thing: <Style TargetType="{x:Type ToolTip}"> <Setter…

  • Pixel-perfect Multi-DPI Images in WPF (Part 3)

    View source on GitHub. In Part 1 of this series, I discussed the problem of displaying different bitmap images at different DPIs in WPF. In Part 2, I proposed a solution using multi-frame TIFFs and two simple markup extensions. In this final post I will present a basic program that takes multiple images (PNG recommended),…

  • Pixel-perfect Multi-DPI Images in WPF (Part 2)

    View source on GitHub. See also: Part 1 and Part 3. In Part 1 of this series, I explored the issue of displaying pixel-perfect bitmap images in the Windows Presentation Foundation. In this article, I’ll describe a method of displaying different images depending on the system DPI setting using a custom Markup Extension and multi-image…

  • Pixel-perfect Multi-DPI Images in WPF (Part 1)

    View source on GitHub. See also: Part 2 and Part 3. I’ve written previously about DPI-awareness in the Windows Presentation Foundation and how to specify measurements in pixels rather than Device Independent Units (DIUs). Something else to consider is image scaling – unlike the Windows Ribbon control or WinRT, WPF has no in-built mechanism for…

  • FastPictureViewer Codec Pack, Windows 8 and WPF don’t play nicely together

    Update (2012-09-06): After some trial and error, it seems the Canon Hack Development Kit (CHDK) component is causing the issue. If you’re experiencing the same problem, try removing this component. Update (2012-09-05): The FastPictureViewer support team was unable to reproduce the issue, but suggested it might have something to do with the JPEG Auto-Rotate feature.…

  • Keiki Usage Meter 3.1.0 Released

    I’ve released an update for Keiki Usage Meter. There has been a lot of behind-the-scenes work, but the user experience hasn’t changed drastically. Visit the website to find out what’s new. I’m using this program as something of a testbed for some engineering work that I’ll talk about in future posts, including supporting pixel-perfect bitmap…

  • WPF: Using System Colours in Animations

    WPF provides access to the Windows system colours through the System.Windows.SystemColors class. As the MSDN documentation indicates, it’s possible to bind to these colours dynamically using the *Key resources, so when the system colours change, so will the appearance of your application. This code will set the colour of a TextBlock to the ‘GrayText’ system…

  • When should a program’s UI animations be disabled?

    Modern frameworks like the Windows Presentation Foundation, its relative Silverlight and the upcoming Windows Runtime make it easy to add animations to a program’s graphical user interface. When implemented well, animations subtly improve the user experience and can demonstrate a high level of polish in your application. The Zune client software and Windows Live Messenger…