Wpf WP8:RichTextBox没有文档属性

Wpf WP8:RichTextBox没有文档属性,wpf,xaml,windows-phone-8,richtextbox,Wpf,Xaml,Windows Phone 8,Richtextbox,因此,我在WP8项目的xaml页面上有一个RichTextBox,设置如下: <RichTextBox x:Name="ContentDisplay" IsReadOnly="True"> </RichTextBox> 着手 当我尝试使用上述行编译项目时,我得到以下错误: 'System.Windows.Controls.RichTextBox' does not contain a definition for 'Document' and no extension

因此,我在WP8项目的xaml页面上有一个RichTextBox,设置如下:

<RichTextBox x:Name="ContentDisplay" IsReadOnly="True">

</RichTextBox>
着手

当我尝试使用上述行编译项目时,我得到以下错误:

'System.Windows.Controls.RichTextBox' does not contain a definition for 'Document'
and no extension method 'Document' accepting a first argument of type 'System.Windows.Controls.RichTextBox' could be found 
(are you missing a using directive or an assembly reference?)   
尝试用谷歌搜索,我发现了一个类似但不相同的问题,这一次,人们试图使用“文本”属性(与文档属性不同,它甚至不存在)
那么,请告诉我如何使用该控件?

您可以使用
块和
段落向该控件添加内容。下面将在
RichTextBlox
中添加另一行

var段落=新段落();
添加(“你好”);
richText.Blocks.Add(段落);

Document属性在控件的Silverlight版本上可用。不幸的是,并不是所有的功能都被移植到windows phone

'System.Windows.Controls.RichTextBox' does not contain a definition for 'Document'
and no extension method 'Document' accepting a first argument of type 'System.Windows.Controls.RichTextBox' could be found 
(are you missing a using directive or an assembly reference?)