ProxyRenderTransform Library and Extensions methods

Aucun commentaire

As you maybe already know, since C# 3 extensions methods are availables. Their goal is pretty simple : they permit to extend natives' object capabilities. extensions methods must be contained in static class and are also static. That's the example shows below :

static class MyExendsMethods
{
public static bool IsBiggerThan (this int myInt, int compare){ return myInt > compare; }
}

You will notice the use of keyword "this" for the first parameter. It means that it will impact integers the second parameters is, in fact, the first parameter of the method IsBiggerThan when it will be called :

int monEntier = 37;
bool myBoolean = monEntier.IsBiggerThan ( 13 );

recently, I used extensions methods to allow easy access to renderTransforms nodes. These are difficult to target by C# when they are not named
if you add the reference ProxyRenderTransform.dll, you will easily reach RenderTransform for any FrameWork element by extensions methods : SetX, GetX, SetScaleX, GetScaleX, etc...
download ProxyRenderTransform library on Code Plex.
Don't hesitate to send me an email or post a comment if you get bugs or difficulties when you use it :)

Bookmark and Share

Leave a Reply

Security Code: