C# Disciples

my life in Avalon ….

: Avalon Controls Library :

AvalonControlsLibrary has now been uploaded on CodePlex ….. Click here to visit CodePlex page

What is this?

AvalonControlsLibrary is a set of WPF controls that I have decided to develop to help out the WPF community.

What controls can I find in this Library?

DateTimePicker

DateTimePicker is DatePicker and TimePicker combined together in one control. For more info visit here

Docky

Docky is a control that lets you Dock panels just like a normal dock panel. The difference with Docky is that you can undock and drag around the controls that you docke. For more info visit here
RatingSelector

RatingSelector is a very simple control that lets the user select a rating. The rating that the user can select can be within a specified range. This control also lets you change the way it looks by supporting control templates. For more info have a look at this blog post

MaskedTextBox

This control allows you to set a mask for a textbox to validate the user entry. For more info visit the blog post.

DataGridView

DataGridView is a maybe a misleading name for this control. This control is far from being the same as the WinForms DataGridView (maybe someday it will J). Basically this control is a WPF ListView control but it is capable of auto generate the GridViewColumns for you. It generates the columns by looking at the objects’ properties. You can also specify how you generate the columns by decorating your properties with a custom attribute. For more information have a look at this post.

TimePicker

Time Picker is a very basic control that lets the user selects a specific time. The user can enter the time in 3 textboxes supplied. he can also increase/decrease the time by using the 2 buttons supplied in the control. The increase/decrease time commands are also linked to the Key up / key down so that the user can use the key up and key down to increase/decrease the time.

DatePicker

I guess that this is the most popular control (at least that’s what my BlogStats say!). As the name suggests, DatePicker is used to pick a specific date. This control supports ControlTemplates to change the way it looks. It was a very nice control to develop, in fact this was my first ‘lookless’ control J. You can find a blog post for this control here.

RangeSlider

The RangeSlider is a control that lets the user select a range. Again this control supports ControlTemplates to change how it looks. You can find a blog post for this control here.

TreeListBox

This is my favourite control. This is basically a WPF ListBox yet it looks and behaves like a WPF TreeView. The question is why do you want a ListBox to look like a TreeView? The answer is very simple ‘Virtualization’. The WPF TreeView does not use the VirtualizingStackPanel (not even if you explicitly specify this in the ItemsPanel property) because VistualizingStackPanel does not understand hierarchies yet luckily the ListBox does. So basically this control takes care of placing the children of the root nodes in the proper index and indent the children by the level in the hierarchy. You can also use this control to support multi select, since the TreeView does not support this feature. When you have a lot of items for the TreeView I would suggest using this control since this will for sure benefit your application in terms of memory and also performance at start-up, since it only populates the items that can fit on screen. For more details on this control visit my blog post here.

Magnifier

This is a very unusual control. Basically it is a slider that notifies listeners if the thumb is being dragged to one of the sides. It raises an event at specified intervals. I personal used this control to create a zoom in/out effect. I think that you can fairly say that the Magnifier is the brother of RangeSlider. Why? Imagine you have a specific date range and you want to decrease or increase the range. You can do this by using the RangeSlider but the RangeSlider has one limitation the user can increase the range from one side at a time. Yet by using the Magnifier increase/decrease the range selected from both ends (from and to at the same time). You can have a look at this blog post for more information.

What does the download include?

The download includes

  • - The AvalonControlsLibrary VS Project
  • - A test application for all controls
  • - All unit tests for controls
  • - The AvalonUnitTesting VS Project (for more info click here)

Do you update this library?

Of course I do (when I have enough spare time and my wife leaves me aloneJ). If you want I can even send you an email whenever I update the library. Just send me an email at marlongrech@gmail.com with your email address and I will make sure to send you a mail to notify you whnever I make an update (don’t worry your email address will be kept private).

How do I submit a bug?

To submit a bug you can just send me an email at marlongrech@gmail.com. You can also submit bugs in codeplex issue tracker for the AvalonControlsLibrary project
What should I do if I have any problems using this library?

Unfortunately I did not create a manual. In the near future I will open a FAQ and some more documentation but for now since the library is very small all the documentation is inside the comments of the code and my blog. Worst case just contact me by sending me an email at marlongrech@gmail.com and I would be more than happy to help you out with your problems.

Finally, I hope that you find this library useful and have loads of fun playing around and maybe even learn something with my beloved AvalonControlsLibrary. If you have any ideas of controls that I should include in this library send me a mail at marlongrech@gmail.com

AvalonControlsLibrary is provided “AS IS” with no warranties, and confers no rights.
DOWNLOAD AvalonControlsLibrary

17 Comments »

  1. [...] Avalon Controls Library : [...]

    Pingback by New Page dedicated for AvalonControlsLibrary « C# Disciples | October 21, 2007

  2. Hello!

    I was looking for a way to smoothen the fonts on my C# Windows Form project and came across your article. Thanks for the introduction!

    Comment by Marlon Gozun | December 11, 2007

  3. Thanks for your library, it’s very good!

    I’m currently starting a WPF application for work and the lack of a DatePicker / TimePicker / MaskedTextBox control were killing me. I just didn’t have the time to develop these things myself while learning WPF and trying to meet the deadlines.

    Comment by TonyJ | December 12, 2007

  4. I just came across this while processing submission on community credit and sounds very cool! I am actually a developer myself who is using WPF for a project right now and I am really looking forward to seeing the TreeView control because I have an immediate need for it, but all of the other controls sound really great as well. I will be sure to check them all out next week. Thanks for posting this!

    Comment by David Silverlight | December 22, 2007

  5. [...] Avalon Controls Library : [...]

    Pingback by AvalonControlsLibrary - Project in the PipeLine… « C# Disciples | December 29, 2007

  6. The controls work great in a standard WPF executable, but I need to use them in an XBAP app. Everything in my app works fine, but when i add any avalon control, i get an XamlParseException. Then when I remove the control, it runs fine again. Have you tested with Xbap? any suggestions?

    Comment by Joe | January 24, 2008

  7. I did not test the controls with XBAPs :(

    Which control are you using in the XBAP?

    Comment by marlongrech | January 24, 2008

  8. I tried both datepicker and timepicker. same results

    Comment by Joe | January 24, 2008

  9. Hi,

    I tried DatePicker in XBAP (.Net 3.5) and it is working ok for me …. Can you send me a demo project or something….

    P.S sorry for taking so long o respond but I did not see the comment … :)

    regards

    Comment by marlongrech | February 6, 2008

  10. [...] 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 - [...]

    Pingback by An update to TimePicker control in AvalonsControlLibrary « C h a k s’ C o r n e r | March 12, 2008

  11. Great controls!

    Just like to ask, do you have the plan to create PropertyGrid control for WPF?

    Thanks
    Hardy

    Comment by Hardy Wang | June 17, 2008

  12. This is a fantastic collection of controls. The DatePicker is invaluable. One question: is it possible to change the display format of the date without changing the source?

    Comment by Ryan Riley | June 25, 2008

  13. Okay, two questions. :) Can you bind to a data source with the calendar control? I can’t find an attribute to which to bind to a data source. Thanks!

    Comment by Ryan Riley | June 25, 2008

  14. Nevermind on the second question… I found it in the CurrentlySelectedDate. Sorry for the deluge of comments!

    Comment by Ryan Riley | June 25, 2008

  15. hi, there is not a feature to change the date format in the current version but you can do a property that supports this very easily… I might add this in the near future…

    Comment by Marlon Grech | June 26, 2008

  16. Hi,

    I’ve found two bugs in the DatePicker control (using .net 3.5):

    1) If I set the Value property before the control is displayed for the first time, it displays the date in English format (7/3/200 8) until the user selects another date (then it uses the correct locale).

    2) If I open up the drop-down part for the first time, I can’t select any date from the current month (nothing happens on mouse-click). Only dates from other months are selectable.

    Great control nevertheless!

    Comment by Timo Kunze | July 3, 2008

  17. Big sorry, I clicked the wrong link and meant another DatePicker control. Yours runs fine.

    Comment by Timo Kunze | July 3, 2008

Leave a comment