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

Binding to RadPathButton PathGeometry Glyph

1 Answer 187 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 22 Mar 2019, 03:51 PM

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?

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Vladimir Stoyanov
Telerik team
answered on 27 Mar 2019, 12:45 PM
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.

Regards,
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.
Tags
Buttons
Asked by
Rob
Top achievements
Rank 1
Answers by
Vladimir Stoyanov
Telerik team
Share this question
or