WPF skin engine (aka Skinner) updated to 1.1

The initial release of the Skinner (you can read up the details here) put a lot of effort into securing your application from loading malicious code into your main domain in full trust. It required assemblies that contained skins (in the form of BAML or just references through SkinDescription attributes) and all assemblies that are referenced by them (through merge »

Efficient way to position windows in WPF

Imagine you have created a custom template for your window and disabled standard chrome. If you want to maximize your window you can’t just set its WindowState to Maximized because it will move over the taskbar. Instead, you will have to position it so its top left corner is at 0,0 and its bottom right corner is at »

WPF skin engine–revisited

UPDATE: Version 1.1 has been released. Check out the details here. The Skinner library that I introduced some time ago didn’t put much care into security issues you may run into when loading and executing 3rd party components (skins). I had touched on these issues in one of my previous posts where I also gave my view on »

WPF skin engine – part 2

This is a follow-up post to the previous one about the Skinner library. In this post I want to focus on a few technical peculiarities of the library and explain why certain things were done the way they were done. Loading a skin I already mentioned that Skinner does scanning for available skins on a separate thread and in a »

WPF skin engine – part 1

NOTE: The information presented in this post is outdated. It does describes the problem the library tries to solve but the approach in which this is done has changed. For the current library description please visit WPF skin engine - revisited. In the upcoming couple of posts I’m going to a cover a simple yet useful helper library I »

Single instance of a WPF app – part 5 (Remoting)

When I blogged about a WCF solution some time ago I mentioned another option to implement this feature by using a fast Remoting channel. That sprang up in my mind again and I decided to give it a try. As a result I got a very neat and fast solution. Interested? Read on! .NET Framework 2.0 introduced a new »

Best way to get DPI value in WPF

WPF is a great presentation platform that requires far less journeys to Win API compared to Windows Forms. Still, there are cases when native calls will do the job better, cleaner and (perhaps) faster. From the top of my head, how would you explicitly place a window on the screen? Yes, there are Top and Left properties in the Window »

Single instance of a WPF app – part 4 (WindowsFormsApplicationBase)

In my intoductory post I mentioned another way to implement a single instance WPF application by making use of Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase class. This scenario is also covered in the great book on WPF by Matthew MacDonald and I thought my story wouldn’t be complete without looking at this option. Microsoft.VisualBasic.ApplicationServices namespace lives in Microsoft.VisualBasic »

Single instance of a WPF app – part 3 (WCF)

Last time I blogged about a way to implement a single instance feature using WM_COPYDATA Win32 mechanism. It involves a bit of PInvoke but still works perfectly well with WPF. This implementation dates back to .NET 1.1 and to be more precise – the old Win32 days as it was inspired by Joseph M. Newcomer's article. A lot of »