Binding to RadPathButton PathGeometry Glyph

2 posts, 1 answers
  1. Rob
    Rob avatar
    16 posts
    Member since:
    Aug 2018

    Posted 22 Mar Link to this post

    I've got the following buttons:

    <telerik:RadPathButton Command="{Binding DoActionCommand}" PathGeometry="{telerik:RadGlyph Glyph={Binding Action.FontIcon}}" PathStyle="{StaticResource UniformPath}" Content="{Binding Action.Label}" ContentPlacement="Bottom" Margin="0,6,6,0" Padding="12" />


    If I set the Glyph property to something like {StaticResource GlyphGear} then this works.  However when I try to bind to it, the button fails to render and as far as I can tell there is no error.  I have tried setting the bound value to the "&#xe13a;" and "GlyphGear" and tried with and without the StringToGlyphConverter with no luck.  What am I missing?






  2. Answer
    Vladimir Stoyanov
    Vladimir Stoyanov avatar
    421 posts

    Posted 27 Mar Link to this post

    Hello Rob,

    Thank you for the provided code snippet. 

    The Glyph property of the RadGlyph MarkupExtension is not a dependency property and it is not possible to bind to it. 

    With this in mind, you can create a converter which will convert the glyph string into a Geometry. You can utilize the RadGlyph.GetGeometry method for this purpose. I am attaching a sample project demonstrating this approach for your reference. Please, check it out and let me know if it helps.

    I am looking forward to your reply.

    Vladimir Stoyanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top