In this article I am going to talk about the RoundToggleButton and RoundButton controls from the Coding4fun Toolkit in details. I will explain everything about the main features, available public API, sample usage etc.
Basically RoundToggleButton is an UI component that derives from CheckBox and exposes ImagePath dependency property. As its name says it is some kind of extended toggle button with round shape and inverted image support.
Basically RoundButton is an UI component that derives from Button and also exposes ImagePath dependency property. As its name says it is some kind of extended button with round shape and inverted image support.
To begin using RoundToggleButton/RoundButton first add a reference to the Coding4Fun.Phone.Controls.dll assembly.
RoundToggleButton derives from CheckBox so it exposes all properties and methods of the CheckBox class plus one more : ImagePath.
RoundButton derives from Button so it exposes all properties and methods of the Button class plus one more : ImagePath.
This is a dependency property of type string. It gets or sets the Image of the RoundToggleButton / RoundButton controls.
This property comes from the parent class and is used to set the content of the Button.
NOTE: When adding icons to these buttons have in mind that it is preferable to have two opposite images: Normal and Inversed. Otherwise your icon may not be visible when pressing the button.
Check the MSDN documentation related to composite formatting for reference.
Now lets create a sample project, add reference to Coding4Fun.Phone.Controls.dll (as described above) and add several RoundButtons/RoundToggleButtons . I will also add some more "light" and "dark" icons.
For more icons take a look at UX section of our "WP7 Dev guide" we collect all resources related to the Windows Phone 7 development there.