Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to use an image from application resources in a DXPrinting template

$
0
0

When using an image from resources inside a DXPrinting template, your first move might be to write something like this:


<DataTemplate x:Key="reportFooter">

<dxe:ImageEdit IsPrintingMode="True" Source="/E3916;component/Images/logo.png" />

</DataTemplate>


Unfortunately, due to the specific behavior of the Image / BitmapImage controls in Silverlight, this approach might not work. The image is created asynchronously. So, when the DXPrinting engine composes the document, the image is not ready and it is not displayed. The next time you build the document, the image is in the image cache already and is available immediately, so the DXPrinting engine successfully adds it on a document page.

This sample illustrates how to display an image from resources using the ImageDataConverter.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>