Thanks for writing back and for the further clarifications.
I have managed to refactor your code and to make it work as you require. Please take a look at the following code snippet:
sender, ApplicationBarButtonClickEventArgs e)
Brush brushColor =
// update highlight color (background)
brushColor = button.Background;
Style newStyle =
Setter setter =
setter.Property = ToggleButton.BackgroundProperty;
setter.Value = brushColor;
.PB_ColorPicker.PickerButtonStyle = newStyle;
As you can see, I first store the background Brush
of the checked toggle button in the popup and break out of the foreach
loop. After that I use the stored brush to create a new style object with the proper setters and apply it to the style of the ToggleButton
within the RadPickerBox
I hope this helps.
Do not hesitate to get back to us in case you have further questions or need assistance.
All the best,
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>