A
A
Adolf Milos2020-03-24 09:52:27
.NET
Adolf Milos, 2020-03-24 09:52:27

Why do I get errors when converting a vector graphics file to XAML?

Rewriting the example from "The C# 7 Programming Language and the .NET Platforms and .NET Core, 8th Ed. by Andrew Troelsen, Philip Japix" page 1057, converting a vector graphics file to XAML . I opened the .svg file with Inkscape and printed it using Microsoft XPS Document Writer as the printer. I changed the resulting .oxps file to .zip, unzipped it into a folder, copied the contents from the 1.fpage file (except for the opening and closing FixedPage handles) into the Canvas of my WPF application (everything is the same as written in the book). Changed all the wrong file paths, but the errors still remain.
Please tell me how to fix this?

5e79aca5b1236051736145.png
5e79ad19ef65e961324224.png

If you specify the path to _D1.dict through the properties window, then the error remains:
5e79ad97b2d00273866765.png

The file itself:
5e79adab43968673341573.png

Please help with the resolution of these errors or point to the relevant literature. Thanks))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Peter, 2020-03-24
@petermzg

ResourceDictionary.Source does not imply work with an external file.
Documentation

E
evsugin_andrew, 2020-03-27
@evsugin_andrew

I have not come across this, but Inscape allows you to immediately convert to xaml.
Maybe try to convert and make a custom control to insert directly in the xaml code?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question