Xaml Windows Phone RichTextBlock超链接内的图像
我正在Windows Phone 8.1上开发应用程序。我使用RichTextBlock来显示丰富的内容:文本、图像、超链接 下面是如何为富文本块创建图像的方法:Xaml Windows Phone RichTextBlock超链接内的图像,xaml,windows-phone,windows-phone-8.1,richtextblock,Xaml,Windows Phone,Windows Phone 8.1,Richtextblock,我正在Windows Phone 8.1上开发应用程序。我使用RichTextBlock来显示丰富的内容:文本、图像、超链接 下面是如何为富文本块创建图像的方法: new InlineUIContainer { Child = new Image { Source = new BitmapImage(new Uri("http://img.jpg", UriKind.Absolute)) } }; 我尝试创建包含图像的超链接,如下所示: hyperlin
new InlineUIContainer
{
Child = new Image
{
Source = new BitmapImage(new Uri("http://img.jpg", UriKind.Absolute))
}
};
我尝试创建包含图像的超链接,如下所示:
hyperlink.Inlines.Add(CreateImageInlineUIContainer(...));
这行代码引发异常:
ArgumentException: A first chance exception of type 'System.ArgumentException' occurred in mscorlib.ni.dll
Additional information: Value does not fall within the expected range.
我错过什么了吗?是否有其他方法将带有图像的超链接添加到RichTextBlock