Hi guys,
I'm trying to add an ImageInLine into header (a classical Logo Company).
I would keep aspect ratio of my bitmap, but after export to word, it takes not effects.
I tryed to change PreferRelativeToOriginalResize to true and to false, when I try to open properties of image (into generated word file), I found this propertiy correctly changed.
But if I try to do same approach with LockAspectRatio to true and to false, It's ever false. Why?
This is my code to test.
I attached 4 test bitmap, 2 for PreferRelativeToOriginalResize (correctly results) and 2 for LockAspectRatio (wrong results)
editor.Document.HasDifferentEvenOddPageHeadersFooters = false;var header = editor.Document.Sections.First().Headers.Add();var image = header.Blocks.AddParagraph().Inlines.AddImageInline();using (FileStream fs = File.Open(@"Resources\mylogo.jpg", FileMode.Open)){ image.Image.ImageSource = new Telerik.Windows.Documents.Media.ImageSource(fs, ".jpg"); //image.Image.PreferRelativeToOriginalResize = false; image.Image.LockAspectRatio = true; //image.Image.SetWidth(true, 40);}