0
所以,我有我的XAML頁面上的一個RichTextBox我WP8項目,設立這樣的:WP8:RichTextBox中沒有文檔屬性
<RichTextBox x:Name="ContentDisplay" IsReadOnly="True">
</RichTextBox>
我試圖得到它顯示一些文本。我在網上找到的每一段代碼都引用了文檔屬性。但是,當我試圖用它做任何事情時,它就不在那裏。沒有
var test = ContentDisplay.Document;
設置爲。
當我嘗試編譯與前述線項目,我得到了以下錯誤:
'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?)
試圖谷歌,我找到一個類似的但並非最相同的問題的參考,這時候人們試圖使用「文本」屬性(與文檔屬性不同,它甚至不存在) 因此,請告訴我如何使用該控件?