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

RadPathButton change path color

5 Answers 348 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Yang
Top achievements
Rank 1
Yang asked on 06 Apr 2015, 03:02 AM

 Hi,

    I think it's not converniet to change path's color of RadPathButton.

Regards

Yang

5 Answers, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 06 Apr 2015, 06:15 AM
Hello Yang,

You can customize the Path of the PathButton using its PathStyle property: 
<Style TargetType="Path" x:Key="CustomPathStyle">
    <Setter Property="Fill" Value="Green"/>
</Style>
 
<telerik:RadPathButton PathStyle="{StaticResource CustomPathStyle}"/>

Otherwise the Fill of the Path will come from the themes palette.

I hope this information is helpful. Please don't hesitate to write us back if you have more questions. 

Regards,
Milena
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Yang
Top achievements
Rank 1
answered on 06 Apr 2015, 07:08 AM

Thank you very much, Milena,

     I use PathStyle now, but I still consider that there should be a "PathColor" property shown in the property grid. Beause a lot of user will change the default color of the path.

Regards

Yang

0
Milena
Telerik team
answered on 07 Apr 2015, 09:52 AM
Hi Yang,

Thank you for the valuable feedback.

Actually, we have discussed to expose property for the PathFill, but if you want to customize the Path of the PathButton, maybe you would need more than one property (e.g. Stretch, Stroke, etc.). So, we decided to expose a PathStyle property, which we hope is enough user-friendly and easy to use.

We will take your feedback into account in the future development of the PathButton. 
 
Regards,
Milena
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
TheGramix
Top achievements
Rank 2
answered on 12 Aug 2015, 01:56 PM

Hello everybody,

in my case I had to change the Margin but I am using the Implicit Styles and without the BasedOn it doesn't work.

This is the new style definition:

<Style TargetType="Path" x:Key="CustomPathStyle" BasedOn="{StaticResource RadPathButtonPathStyle}">
    <Setter Property="Margin" Value="5"/>
</Style>

BR,

Dino

0
Milena
Telerik team
answered on 14 Aug 2015, 08:51 AM
Hello Dino,

You are right - if you are using Implicit styles in combination with NoXaml binaries and you need to customize/extend a style (e.g. PathStyle of the RadPathButton), then you should BasedOn its value on the default style which is RadPathButtonPathStyle. This way the new style will inherit the values of the original one that are not explicitly redefined in the new style - in your case only the value of Margin property would be changed.

While if you are using Xaml binaries and StyleManager, setting this property is not necessary. But we recommend using the first approach. You can find more information on that matter in our blog post “XAML Theming – Implicit Styles versus StyleManager”.

I hope this information helps.

Regards,
Milena
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Buttons
Asked by
Yang
Top achievements
Rank 1
Answers by
Milena
Telerik team
Yang
Top achievements
Rank 1
TheGramix
Top achievements
Rank 2
Share this question
or