wpfbox is moving to blogger!!

That’s right people, I know it tough to keep track of all content, but I’ll have to move to blogger because I need more integration with my google services. WordPress is great! I’m going to miss the stats page.

 So… the address hasn’t changed much! http://wpfbox.blogspot.com/

happy coding!

Advertisements

WPF memory leaks

I just came across this post from Jossef Goldberg, he talks about memory leaks we should prevent when working with WPF. This is a very detailed article and is a *must read*. I will try to post some tips of my own too as soon as I can.

MultiTriggerImageControl

Some time ago I started creating this decorator that takes an image and splits it in five parts (default, normal, disabled, clicked, over (I’m not sure about the order)) and creates an animation between the states of the control. This control also is able to strech part of the image so that you can stretch buttons with round edges.

 I’m leaving the code here so you can explore a bit, it is not very good and not very well implemented yet, I hope I can finish it by the end of the month and repost again. I just wanted start sharing some stuff. 🙂

Here it is!

Visual Studio 2008 Beta 2 goodness!

So, yesterday Microsoft released the new public beta of Visual Studio 2008 and .Net Framework 3.5, I haven’t had the chance to download yet, but I will do so as soon as possible, I’m dying to check out the new features!

You can check some new stuff in WPF on the WPF SDK team blog!

Family.Show

Yesterday, Vertigo released a new version of Family.Show, the reference application used to demonstrate the power of WPF. Yes, this means that you can go and grab the source code! You can find the click once installation and source code at Vertigo’s web site. This version introduces an approach to skinning, for now you’re only able to change mostly colors, I hope that a version 3.0 is released with full customization support (even if the user can’t create new skins).

Loading Resource Dictionaries

If you create a customizable application you’ll most likely use Resource Dictionaries, you can choose to have the default application style inside the application assembly to preserve the look you envisioned for that application and as a fail-safe. Today we’ll see how to load a Resource Dictionary, both from the application assembly and from the file system.

Application.Current.Resources = (ResourceDictionary)Application.LoadComponent(

                    new Uri(string.Format(“themes\\{0}\\{0}.xaml”, theme), UriKind.Relative));

This sample code works both for the assembly stored Resource Dictionary as well as for the File System. The LoadComponent() Method returns an Object, that object is the root element of the loaded XAML, so, you could have any type of XAML element and load it anytime during the application execution. This trick is useful for a themes implementation, loading XAML vectors or even custom animations.

.Net on the mac!

Didn’t I told you I got a feeling something like this was coming? 😀 yay! I don’t have any details yet, just got online now from a 4 day blackout and was reading my feeds when I found several blogs reporting the announcement at MIX07! Drew Marsh has more details! Oh, and I almost forgot, Expression Studio is Out! 😀

Posted in WPF. 1 Comment »