Entries Categorized as 'Programming'

Set a Clip in Code-Behind

Date March 17, 2008

//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 on [...]

Silverlight: TemplateBinding Throwing an Error

Date March 14, 2008

//This drove me crazy for about half an hour… 
I attached this style to a button
<Style x:Key=”NavButtonStyle” TargetType=”Button”>
<Setter Property=”Opacity” Value=”0.8″></Setter>
<Setter Property=”Template”>
<Setter.Value>
<ControlTemplate>
[...]

Get Enum Value from String

Date February 20, 2008

//Here is a quick tip.  If you have the following Enum
Enum Frequencies
DAILY
WEEKLY
MONTHLY
End Enum

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { [...]

Get Tasks in Outlook 2007 with VB.NET

Date January 6, 2008

//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

Related PostsSynchronize Outlook Tasks with Remember the MilkOutlook 2007 is by far the best integrated solution for organizing [...]

Fame, Fortune and WCF

Date December 28, 2007

//I need your help to bring me fame and fortune.
I wrote an article at code project which was entered for a competition.  The winner gets $10k.  Can you please check it out at http://www.codeproject.com/KB/WCF/myfeedreader.aspx and if you like it, please vote for it.  I can’t win if you don’t vote.  Voting will be closed on [...]

VB9 - LINQ and Extension Methods in Action

Date November 30, 2007

//Here is the scenario, I have collection of books and I want to get a book with a specific ISBN.  In the old ways, you will probably have to create a custom collection and inherit a generic collection of books, then add a method to get by ISBN.
Thanks to LINQ and extension methods, you can [...]

Free Icons and Images

Date September 24, 2007

//If you are creating any type of software applications with a user interface, most likely you will need to use icons.  Here is an excellent site to help you find icons for your web sites and applications.
Check http://www.iconfinder.net/

Related PostsFree image editing applicationHere is a great and free image editing software called Paint.NET. I am [...]

Calling the WordPress XMLRPC API from VB.net

Date July 31, 2007

//As an example, I will call the getCategories API method.
Add a reference to the XML-RPC.net library.
Create a struct for the return result

Public Structure category
Public categoryId As Object
Public parentId As Object
Public description As Object
Public categoryName As Object
[...]

Getting Flash Video (FLV) to work in IIS

Date April 26, 2007

//I added a macromedia flash animation (swf) to my asp.net website and it would work fine but when it came to display video it would stop. I figured it had to do with the video files i.e. the FLV file. It turns out that I had to add its MIME type to IIS

Right-click [...]

Highlight syntax in your HTML blog posts

Date April 22, 2007

//Check out this site which lets you create HTML formatted with syntax highlighting for your code snippets. Very helpful when posting to your blog or creating HTML versions of your code. It supports all kind of languages, xml, php, c#, vb.net, css, html and others - even XAML. The site is http://FormatMyCode.com

Related [...]