Set a Clip in Code-Behind

Set a Clip in Code-Behind

You can use the Clip property on any item to clip its display area. For example if you have this two items rectBlue and rectRed like this And you want to animate rectRed by sliding it out from the right side, without clipping it would look like this But if you set the Clip property(…)

Silverlight: TemplateBinding Throwing an Error

This drove me crazy for about half an hour…  I attached this style to a button

Everything compiled fine but the page wouldn’t look right and expression blend would not display it correctly and would display the error message: The member “Content” is not recognized or is not accessible. I have not idea how(…)

Get Enum Value from String

Here is a quick tip.  If you have the following Enum

And you want to get the enum value from a string, you can:

If you try to parse a string that doesn’t exist e.g. "YEARLY", an ArgumentException exception is thrown with a message "Requested value ‘YEARLY’ was not found". Also note(…)

Get Tasks in Outlook 2007 with VB.NET

You can retrieve the list of tasks in your Outlook 2007 using the following code Dim ns As Outlook.NameSpaceDim tasks As Outlook.Itemsns = Application.GetNamespace(“MAPI”)tasks = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderTasks).Items Dim task As ObjectFor Each task In tasks    ‘ iterate through the tasks hereNext