Serialize an image in XAML using XamlWriter

I am using XamlWriter to serialize a group of WPF objects. One of these objects is the Image control, whose source is installed in a file on disk.

When XamlWriter serializes objects, it sets the source image to Uri, which points to a file in the file system. Is there a way to include this data in Xaml so that instead of a file link, the information is stored in xaml?

thanks

+3
source share
2 answers

Well, in the end, I built a wrapper class that used a binary serializer to store images and xaml code from XamlWriter.

+1
source

MSDN:
XamlWriter.Save

" , , , URI, ".

+2

Source: https://habr.com/ru/post/1711198/


All Articles