Answer the question
In order to leave comments, you need to log in
Vector icons in WPF - how to get?
More than once in the examples of WPF templates I have seen icons described through GeometryDrawing with a line similar to this: F1 M 9.46933,0.573334L 0.480001,10.0653C 11.2933C 6.05981e-007,11.7413 0.160001,12.1907 0.480001,12.5253L 0.480001,12.5253C 0.798667,12.8587 1.224,13.0267 1.70267,13.0267L 1.70267,13.0267C 2.12933,13.0267 2.55467,12.8587 2.87467,12.5253L 10.64,4.31467L 18.46,12.5253 C 18.7773,12.8587 19.1507,13.0267 19.6827,13.0267L 19.6827,13.0267C 20.108,13.0267 20.4813,12.8587 20.8547,12.5253L 20.8547,12.5253C 21.1173,12.2507 21.236,11.9 21.2987,11.536L 21.2987,11.032C 21.236,10.6533 21.1173,10.34 20.8547 , 10.0653L 11.864.0.573334C 11.4907.0.238668 11.1187,069334 10.64,069334l 10.64,079334C19.392C 3.192,20.4813 3.61467,21.1293 4.45733,21.3333L 8.3,21.3333L 8.3,13.528C 8.3,13.4187 8.352,13.2507 8.45867,13.192L 8.45867,13.192C 8.512,13.0813 8.67067,13.0267 8.77867,13.0267L 12.4493,13.0267C 12.6093, 13.0267 12.7147,13.0813 12.768,13.192L 12.768,13.192C 12.8747,13.2507 12.9267,13.4187 12.9267,13.528L 12.9267,21.3333L 16.7693,21.3333C 17.6133,21.1293 18.036,20.4813 18.036,19.392L 18.036,13.584L 11.0653,6.324C 10.9053, 6.1 10.8.5.98934 10.64.5.98934L 10.64.5.98934C 10.5347.5.98934 10.3747.6.1 10.2147.6.268 Z3333C 17.6133,21.1293 18.036,20.4813 18.036,19.392L 18.036,13,584L 11.0653,6.324C 10.9053,6.1 10.8,5.98934 10.64,5.98934L 10.64,5.98934C 10.5347,5.98934 10.3747,6.1 10.2147,6873333C 17.6133,21.1293 18.036,20.4813 18.036,19.392L 18.036,13,584L 11.0653,6.324C 10.9053,6.1 10.8,5.98934 10.64,5.98934L 10.64,5.98934C 10.5347,5.98934 10.3747,6.1 10.2147,687
Is there a converter that can produce a string describing an icon from a normal vector image?
Answer the question
In order to leave comments, you need to log in
If you need to display a vector icon in your application:
Take a vector image (svg), open it in IE, press print, print via Microsoft XPS Document Writer. Next, save this document (IE will offer to save). After that, change the extension of the resulting XPS file to .zip. Unpack this zip-archive, go there to the "Documents\1\Pages\" folder and find the file with the extension .fpage (usually the file "1.fpage")
Open the file with any text editor (the file is not formatted. For convenience, I open these files through the view plugin of TotalCommander (F3 key by default)) and you will see Paths there. Here they are what you need. Which ones - determine by touch (usually the ones you need are at the beginning of the file)
To check (XAML):
<Border>
<ContentControl>
<ContentControl.ContentTemplate>
<Viewbox >
<Grid>
<Path Data="%строка описания%" Fill="%цвет%"/>
<Path Data="%строка описания%" Fill="%цвет%"/>
...
<Path Data="%строка описания%" Fill="%цвет%"/>
</Grid>
</Viewbox>
</ContentControl.ContentTemplate>
</ContentControl>
</Border>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question