O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing Metadata

The same three approaches for reading metadata apply to writing metadata as well. The file-based ImageProperties approach already supports reading and writing most of its properties, and that was shown in the “Decoding Images” section. The two BitmapProperties approaches can be used with BitmapEncoder’s BitmapProperties property. This property is of type BitmapProperties rather than BitmapPropertiesView, so it enables writing properties with its SetPropertiesAsync method as well as reading them with its GetPropertiesAsync method.

The following code can be added to the end of the UseEncoder method to write pieces of metadata into the red-blue gradient file:

BitmapPropertySet properties = new BitmapPropertySet ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required