An update to TimePicker control in AvalonsControlLibrary

13 03 2008

I hope many use AvalonsControlLibrary in their WPF projects 8) , if not, do have a look! It has got really very useful WPF Controls – Thanks to Marlon 🙂

Today I did a small update to the TimePicker control. I added another Property called CurrentlySelectedTime which can be used to get the current time in the TimePicker control in String of format h:m:s and also set the time by giving the time as a String in the format h:m:s

For example,

timePicker.CurrentlySelectedTime = “12:34:56”;



This addition totally came out of my personal need for my Project. So, I am not sure how far it would be useful for you ;). But, the logic is there in the source code now so that you could tame it to the format you want, may be add AM and PM and change to 12 hr format 8)

Marlon will soon update the updated source code at CodePlex, but until then you can download it here


SystemIcons.Shield Icon

18 12 2007

Daniel Moth has blogged about the new SystemIcons.Shield icon added to the set of System.Drawing.SystemIcons collection. This new Shield icon can be used to display whenever an admin task is required to be carried out. You would be familiar with this icon if you are using Vista. For example – If you open the Indexing Options dialog box in Vista,


You can see the Advanced button has the Shield icon in it which indicates that it would be an admin task.

You can refer to Daniel’s post on how to add the Shield icon to Windows Forms application

If you want to add to an Image control in a WPF application, all you have to do is set the Image‘s Source property to a BitmapSource. You can create the BitmapSource object from an Icon as shown below 🙂

BitmapSource source = System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon
     Int32Rect.Empty, System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());

this.MyImage.Source = source;

And you can see something similar,


WPF CheckBox rendering problem + solution

3 10 2007

Ok, this might not be an issue for all systems, but few (like mine )

Here is the problem. I will explain with screenshots

Read the rest of this entry »

WPF Data Binding – Part 1

22 09 2007

Anybody who have heard of WPF should be wondering what is this Data binding 🙂

Yes, I was also feeling a bit difficult to understand what is Data binding, but things are becoming clearer to me as I go through many samples.

This post will give you an introduction to Data binding and you will really find how easy is to use Data binding than the normal way of doing things 😀

Read the rest of this entry »