IE8 Beta 1 breaks Image Download in WPF applications

I ran into this issue when IE8 was first released and it doesn't seem to have gotten much visibility elsewhere. IE8 Beta 1 breaks image downloads for WPF applications when the image has a web uri. From the stack trace this seems to be caused by wininet.dll not returning the internet cache folder correctly. A typical call stack for the error message might look something like this (when the uri specified is a http uri, I haven't checked FTP) A first chance exception of type 'System.ArgumentException' occurred in PresentationCore.dll System.ArgumentException: Value does not fall within the expected range. »

Author image

Silverlight 2.0 Beta 1 and WPF Resource Management: What's the same and what's different?

Both Silverlight 2.0 and WPF support the notion of resources, which can be associated with almost any element - in both SL and WPF the widely inherited-from FrameworkElement (and in WPF the FrameworkContentElement) class exposes a Resources property of type ResourceDictionary. The Resources dictionary is a simple collection of key-value pairs. Almost anything can be stored as a resource, from brushes to templates, data sources, converters, dates, strings and any other .NET object which can be represented as XAML. »

Author image

Silverlight 2.0 beta1 and WPF Data Binding – what’s the same and what’s different?

Silverlight 2.0 promises to bring much of the goodness of WPF to the browser. So how does one of my favourite WPF features - data binding - fare in the new Silverlight 2.0 beta 1 world? To help answer this question I drew up the following summary: Similarities Differences Binding Object – the Binding object is present in both SL 2.0 and WPF. Many simple binding scenarios will probably work between the two without modification, but if you’re using the more complex properties of the Binding object in WPF you’ll need to revisit that for Silverlight 2.0 code. »

Author image

2 Great Free Resources for WPF Developers - ElementFlow and DataGrid 2.0

Pavan Podilla has added his ElementFlow control to a suite of free open-source tools called FluidKit. ElementFlow is a layout panel that provides several carousel-like layouts, including one quite similar to the "coverflow" from Apple's iTunes application. You can check out some videos of ElementFlow here. My favourite part of ElementFlow is that it has been architected in the "wpf way" - Pavan modified it a while back to be a panel, and it uses templating for specifying how items should appear. »

Author image

Write Your Own Hardware Accelerated BitmapEffects - Coming soon to WPF

One of the interesting announcements that seemed to get lost in the flood of Silverlight news from Mix08 was a further information about future improvements to WPF. In his keynote talk Scott Guthrie re-iterated many of the things he'd detailed previously in the 3.5 client road-map. One slightly new bit of information was the opening up of BitmapEffects to people outside Microsoft. Not only that, you will be able to write hardware accelerated BitmapEffects! »

Author image

Finding Memory Leaks in WPF Applications

Jossef from the WPF Preformance Blog wrote a useful article about a month ago on diagnosing memory leaks in WPF applications. Although some of the issues shown are not WPF specific the leaks caused by command and data binding are. This article is well worth checking out if your perfromance testing seems to show a memory leak. »

Author image

Silverlight will get a DataGrid from Microsoft before WPF does

I was pouring over the Silverlight 2.0 tutorial posted by Scott Guthrie, and noticed this entry which describes the currently unreleased DataGrid for Silverlight (due for a beta1 release at Mix08 in a few weeks presumably). The new beta release will also include a calendar date-picker controls (also noticable omissions from the current default set of WPF controls) as well as integral features from WPF such as data binding, and layout management. »

Author image

Converting SVG to XAML - XamlTune vs. Ab2d SVG to Xaml Converter

I've mentioned before my fondness of using SVG content and converting it to XAML. Today I read about the Visio to XAML converter on Saveen's blog and about the approach taken (saving to SVG and then using a third party library XamlTune to convert to XAML). I was fairly interested in reading about this approach because I had tried this myself before (not as an add-in, just saving Visio to SVG and then manually converting) with very limited success. »

Author image

Glossy Brushes using Radial Gradient Brush in WPF

I recently wanted to convert some nice glossy SVG-based shapes into WPF. Here is the result. The original brushes came from here on the OpenClipart.org site. I attempted to convert them using WPF 3D Graphics' SVG-XAML converter, however this proved unsatisfactory for 2 reasons: firstly there was a significant loss of fidelity in the conversion to SVG (which is unusual since the converter is pretty good), and secondly the conversion approach was to create lots of Shape-derived classes absolutely positioned in Canvas elements, so instead I ported and hand-tweaked the brushes. »

Author image

I’m getting errors in the Visual Studio Designer using a custom Attached Property, help!

If you’ve written your own custom attached property in WPF you may come across the following error when you try to look at a Window, Page or UserControl that attempts to use the attached property in the WPF designer in Visual Studio 2008: The Property '[your custom attached property name]' is read-only and cannot be changed The puzzling thing is that you can get this error message even if your attached property is not defined as read-only, and has a setter and isn’t registered as read-only in the Property Meta-data. »

Author image