This is a migrated thread and some comments may be shown as answers.

[Solved] BusyIndicator with custom progress that inherits colors from theme

1 Answer 143 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Doug
Top achievements
Rank 1
Doug asked on 21 Oct 2011, 05:14 PM
I've seen the posts on how to edit a style (e.g., http://www.telerik.com/help/silverlight/common-styling-appearance-edit-control-templates-blend.html) and how to modify the progress indicator, but how do I create a RadBusyIndicator with a custom progress indicator (in my case, I want to modify the size and margins), but allow the control to be styled with the selected application theme style (e.g., Expression Dark, Metro, etc.).  When I create the control templates in blend, they generate specific background colors such as:
  <LinearGradientBrush x:Key="BusyIndicatorIndeterminateBackground" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFFC92B" Offset="0"/>
        <GradientStop Color="#FFFFF7A9" Offset="1"/>
        <GradientStop Color="#FFFFFBCD" Offset="0.254"/>
        <GradientStop Color="#FFFFC92B" Offset="0.5"/>
    </LinearGradientBrush>

But I really want the colors to be the themes colors, not the ones generated by blend. I've gotten some success by setting the colors using the TemplatedBinding.
Example:  <Path x:Name="IndeterminateBackgroundDonut" Fill="{TemplateBinding Background}" ,
but I still haven't been able to get all the stroke and Fill colors to reflect the colors of the application theme.

Thanks for any suggestions,
Doug
 

1 Answer, 1 is accepted

Sort by
0
Dani
Telerik team
answered on 24 Oct 2011, 12:47 PM
Hi Doug,

Expression Blend would always generate the default Office Black theme brushes for you. So if you want to use other theme specific brushes, you will have to make that change manually.

I suggest that you take the default RadProgressBar control template that corresponds to theme you wish to use from the RadControls installation folder/Themes on your machine and apply your customizations on that template. You will get needed template bindings and also theme specific brushes as static resources.

You can later copy that RadProgressBar in RadBusyIndicator control template.

I hope this helps.

Regards,
Dani
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Tags
BusyIndicator
Asked by
Doug
Top achievements
Rank 1
Answers by
Dani
Telerik team
Share this question
or