Round Gel-like button template for WPF

I keep re-creating this from time to time, so I thought I would put it up for others to use. This is a very simple style for rounded gel-like buttons (shown here magnified 3x, but the style works OK for buttons of various sizes). The left-most one is the “normal” style, the middle one is mouse-over and focused, and the right one is disabled. These are great with a slider to create “zoom” type controls, or for play/pause buttons etc. »

Author image

Where are the default templates for FlowDocumentScrollViewer located?

Most controls in WPF are “look-less” and have no default rendering. Instead there are a number of “templates” that are applied by WPF. The control template is chosen by WPF, and can be over-ridden by the developer. In the absence of any developer intervention a default template is loaded from a resource assembly corresponding to the operating system that the application runs on (PresentationFramework.Aero.dll for windows vista styles and control templates, PresentationFramework.Luna.dll for windows XP etc). »

Author image

New Window Chrome Materials - a not-too-serious look into the future

Some time around 2004 apple began using a “brushed metal” look for some of the windows in OSX. In late 2006 Microsoft released Vista with its Aero Glass window chrome. Going further back we had a chiseled grey look-and-feel in many windowing systems (chiseled and grey implying stone?). Taking into account the obvious trend where window chrome is styled after real-world building materials, we confidenty predict that wood will be the substance of the future for mainstream operating systems. Agonising conversations regarding timber finishes and preferences that had previously been relegated to only the real world can now spill over into the computer one. Would you like a mahogany title bar and rosewood buttons? Would you like us to dove-tail the corners of the windows to make them stronger? The folks over at the WPF SDK blog have already given a great overview of current window chrome approaches. For ultimate window chrome customization I like Pavan Podila’s [edit: fixed typo in Pavan’s name]Fluidkit which contains the very useful “GlassWindow” style-able window control, and used it to create this beautifully finished window with a mahogany titlebar, trimmed with brushed silver and given a satin finish for the discerning computer user.

Or for the younger users there is this more european window style with a plantation pine title bar.
.
You can download the source here and build more of these windows for yourself. I used Wood Workshop from Spiral Graphics to create the textures. Later this week I’m hoping to bring you another hot tip for window chrome futures - this time with an emphasis on lightweight performance - yes, you guess it! Carbon-fibre window chrome!

»

Author image

WPF - A Year in Review

.NET Framework 3.5 SP1 – The most significant thing on the WPF landscape in 2008 was .NET framework 3.5 SP1, released in September 2008. While service packs are traditionally about bug fixes and performance tweaks this release was a little different for the WPF team, as they added new features such as data template recycling, DirectX integration improvements like Direct3DImage, new controls like the WebBrowser control, a slew of performance improvements and changes to the application model and deployment. »

Author image

XAML Complier has issues with linked xaml files

I thought I would post a short explanation of a small issue I encountered recently with the XAML compiler, in particular with its treatment of linked XAML files. Linked files can be created for all kinds of project files, most commonly code files like .cs or .vb files but it can be anything else. This is almost always done to when you need the same thing in multiple places but don't want to go to the trouble of managing two copies of it. »

Author image

AOL Silverlight-based RIA mail client debuts

Hot on the heels of the Silverlight 2.0 release last week is a beta version of the AOL RIA mail clientpreviewed at Mix08 and built on Silverlight 2.0. (I just signed up but who knew their contextual advertising would catch on so fast!) Although the beta is missing the "HALO" theme featured at Mix08, it does feature 3 themes including Onyx (the default, shown above) "classic" which is themed similarly to a number of other AOL web properties, and a Hubble space theme. »

Author image

WPF Shader Effects Community Project Launched - http://www.codeplex.com/fx

The recent release of .NET 3.5 SP1 adds hardware-accelerated pixelshader effects to WPF. In addition to replacing a number of the slow software-rendered BitmapEffects with shiny, fast hardware-accelerated ones they also added the ability to write your own effects. In order to provide an easy-to-digest package for those who don't want to write shaders themselves, but DO want to add cool effects to their app I created a community shader project, hosted on codeplex at http://www.codeplex.com/fx . »

Author image

Writing your first ShaderEffect for WPF 3.5 SP1

WPF architect Greg Schechter was written a series of articles on the new hardware accelerated shaders recently released in beta form, as part of .NET 3.5 SP1 beta. This article includes some sample code that was enough to get me started down the path of writing a very simple shader effect - I've dubbed it "watery" but it's more just "wavy". In this example the "waviness" of the effect is bound to the value of the slider at the bottom of the screen. »

Author image