WriteableBitmapRenderExtension with Grids, Canvas, Lists?

Mar 18, 2014 at 1:26 PM
Hey,
I am trying to render a grid containing two images to a WritableBitMapImage via the WritableBitmapRenderExtensions.Render() function.
I am getting the following error:
"Falscher Parameter.\r\n\r\n'uri': Only http, https and ftp schemes are allowed."
Here is my Grid:
 <Grid x:Name="RootLayout">
            <Image x:Name="imageElement" Stretch="Fill"/>
            <Image VerticalAlignment="Center" x:Name="imgOverlay" HorizontalAlignment="Center" 
               Height="Auto" Margin="121,152,146,364" Width="200"
               Source="/Assets/HariboBears/bear01_big.png"               
               ManipulationDelta="imgOverlay_ManipulationDelta_1" PointerPressed="imgOverlay_PointerPressed" PointerReleased="imgOverlay_PointerReleased">
                <Image.RenderTransform>
                    <TransformGroup>
                        <ScaleTransform x:Name="scaleTransform" ScaleX="1"/>
                        <TranslateTransform x:Name="translate"/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
And here is how i try to render it:
WriteableBitmap wbmp = await WinRTXamlToolkit.Composition.WriteableBitmapRenderExtensions.Render(fe);
How do i get this to work? Are grids not supported? Which UIElements are supported?

Thanks in advance.
robidd
Coordinator
Mar 26, 2014 at 7:34 PM
Can you check if adding "ms-appx:/" at the beginning of the Image.Source would help fix it? I have a hunch this piece of code in WriteableBitmapFromBitmapImageExtension.FromBitmapImage() might be causing it:
            if (originalString.StartsWith("ms-appx:/"))
            {
                string installedFolderImageSourceUri = originalString.Replace("ms-appx:/", "");
                await target.LoadAsync(installedFolderImageSourceUri);
            }
            else
            {
                var file = await WebFile.SaveAsync(source.UriSource, ApplicationData.Current.TemporaryFolder);
                await target.LoadAsync(file);
                await file.DeleteAsync(StorageDeleteOption.PermanentDelete);
            }
Mar 27, 2014 at 2:18 PM
I've set the image source. But I am still getting the same error.
<Image VerticalAlignment="Center" x:Name="imgOverlay" HorizontalAlignment="Center" 
               Height="Auto" Width="200"
               Source="ms-appx://Assets/HariboBears/bear01_big.png" ManipulationMode="All"          
              />
Coordinator
Mar 27, 2014 at 4:11 PM
Have you tried debugging it?