In Blend, it is possible to convert certain Xaml elements to Path, using Object->Path->Convert to Path option.
Is there some API to do the same programmatically, in a WPF application?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Having dived into the source-code of Expression Blend with DotPeek (for research purposes of course), I can say that the Convert to Path API is not exposed in a useful way.
Internally it uses a number of private methods to convert RichTextBox content, TextBlocks, TextBoxes and simply geometry.
The only external method is in Microsoft.Expression.DesignSurface.Geometry:
But the parameter
SceneElementis a type used only within Expression blend and has a huge number of dependencies. There appears no easy way to create SceneElements for your own Silverlight objects outside of Expression Blend. You could probably execute the functionality as a Blend add-in but I don’t see you getting it working in a stand-alone application.It was an interesting exercise, but unsuccessful. Sorry.