RadPathButton change path color

6 posts, 1 answers
  1. Yang
    Yang avatar
    6 posts
    Member since:
    Mar 2015

    Posted 05 Apr 2015 Link to this post

     Hi,

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

    Regards

    Yang

  2. Answer
    Milena
    Admin
    Milena avatar
    204 posts

    Posted 06 Apr 2015 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yang
    Yang avatar
    6 posts
    Member since:
    Mar 2015

    Posted 06 Apr 2015 in reply to Milena Link to this post

    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

  5. Milena
    Admin
    Milena avatar
    204 posts

    Posted 07 Apr 2015 Link to this post

    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.

     
  6. TheGramix
    TheGramix avatar
    16 posts
    Member since:
    Oct 2007

    Posted 12 Aug 2015 Link to this post

    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

  7. Milena
    Admin
    Milena avatar
    204 posts

    Posted 14 Aug 2015 Link to this post

    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
Back to Top
UI for WPF is Visual Studio 2017 Ready