8
它用於應用程序的幫助部分。我正在考慮將flowdocumentReader顯示幫助文檔。但是,是否可以顯示.rtf或任何.doc以顯示在Flowdocument中。或者需要在Xaml中創建流文檔。請幫忙。如何在WPF中將.rtf或.doc顯示爲flowdocument?
感謝,
它用於應用程序的幫助部分。我正在考慮將flowdocumentReader顯示幫助文檔。但是,是否可以顯示.rtf或任何.doc以顯示在Flowdocument中。或者需要在Xaml中創建流文檔。請幫忙。如何在WPF中將.rtf或.doc顯示爲flowdocument?
感謝,
在這些線路上的事情會做的工作對你在哪裏documentPath是您的RTF文件路徑:
FileStream fileStream = File.Open(documentPath, FileMode.Open, FileAccess.Read, FileShare.Read);
FlowDocument flowDocument = new FlowDocument();
TextRange textRange = new TextRange(flowDocument.ContentStart, flowDocument.ContentEnd);
textRange.Load(fileStream , DataFormats.Rtf);
做雖然增加了錯誤校驗碼。
謝謝,讓我檢查.. – Ershad 2009-10-26 05:19:56
謝謝,再次.. – Ershad 2009-10-26 05:36:21