Tweets by @Actipro
Please take some time to learn more about us and our product offerings.
Build 4.5.0484 of WPF Studio added some very nice enhancements to the RadioButtonList control, which I’ll describe below.
The RadioButtonList is essentially a ListBox that has been templated so that its items appear like radio buttons. The selected item in the RadioButtonList has its related radio button circle checked.
Two new properties have been added to RadioButtonList to allow for more complex layout of the bullets relative to each item’s content.
By default bullets are aligned center and just have a small right side margin to provide space between the bullet and the content. Now you have the ability to set the vertical alignment of the bullets to top or bottom as well. By using the related bullet margin property, you can tweak the margin around the bullet so that it aligns vertically with the content.
A RadioButtonList that aligns bullets to the top and sets a bullet margin
In the screenshot above, the bullets are aligned to the top and a small margin is set to ensure that the bullets line up with the bold header portion of each item’s content.
Another new feature added to RadioButtonList is an option to automatically disable the content of items that are not currently selected.
A RadioButtonList that has automatically disabled the Select button because its item is not currently selected
This feature is better explained in screenshots. In the screenshot above, there is a RadioButtonList with two items. The second item has a Button in its content. Note that since the first item is currently selected, the Button has been disabled per this new feature.
A RadioButtonList that has automatically enabled the Select button because its item is now selected
In the next screenshot, the end user has selected the second item in the RadioButtonList, and therefore the Select button enables.
These new properties make it really easy to create some nice looking radio button lists with complex content. Enjoy!
January 14, 2009 at 16:37
Very nice! I really appreciate Actipro's commitment to aesthetics and flexibility in their controls. Little tweaks like this can improve the look and usability of an application more than most people realize. Keep up the great work!