I'm working on a tool that renders pieces of XAML to images.The XAML is used as a template to design the images. Due to the way the rendering works it is not possible to use a codebehind. Rendering just xaml is no problem.
In one of my templates I want to give the renderer a lat/long and include an image from google maps, among other images stored on the web. The XAML is rendered, but the images are not included. I assume this has to do something with the delay of downloading the images.
A template would look something like:
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Border CornerRadius="10" Background ="#FF123456" >
<Image Source="{0}" Width="250" Height="150"/>
</Border>
</UserControl>
I use a string.Format
to add the URL to the template.
Does anyone know how I can render XAML with remote images?