RenderTargetBitmap RenderAsync Value不在预期范围内

时间:2016-02-26 03:30:29

标签: c# xaml win-universal-app

使用本指南:http://social.technet.microsoft.com/wiki/contents/articles/20648.using-the-rendertargetbitmap-in-windows-store-apps-with-xaml-and-c.aspx

我认为这将是在公园散步,直到我得到这一部分的错误:

public static void wordList()
{
    Scanner keyboard = new Scanner(System.in);

    final String word = keyboard.next(); // <-- this is the current word.
    if (word.equalsIgnoreCase("STOP")) 
        System.out.println();
    else
        wordList(); // <-- it's not STOP, recurse... which 
                    //     will get a new local word (and print it).
    System.out.println(word); // <-- however, this is still current word.
}

这是我的XAML

await renderTargetBitmap.RenderAsync(grid_editor);

它只有文本和图像,对于测试,我没有加载我想要的图像,但它仍然不起作用。同样的错误。

代码:

<Grid Name="grid_editor" Width="500" Height="500">
                        <Image x:Name="image_snap_preview" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Source="Assets/login/images/image (1).JPG"/>
                        <TextBlock Name="txt_123" Text="This text is on top of the image" FontSize="40" TextWrapping="Wrap" Margin="70"/>
                    </Grid>

0 个答案:

没有答案