這是我的第一篇文章.... 我在我的任務中有一個問題... ..我能夠獲得流文檔上的文本文件,但現在我必須劃分正確的內容在運行時分頁,即如果內容是巨大的,他們會在運行時讓頁面數量減少。PageBreak流程文檔在運行時
請幫助... .. 蔭附加的初始代碼:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace TextOnFlowDoc
{
/// <summary>
/// Interaction logic for Page1.xaml
/// </summary>
public partial class Page1 : Page
{
public Page1()
{
InitializeComponent();
Paragraph paragraph = new Paragraph();
paragraph.Inlines.Add(System.IO.File.ReadAllText(@"C:\Lis.txt"));
paragraph.FontFamily = new FontFamily("CourierNew");
FlowDocument document = new FlowDocument(paragraph);
// FlowDocumentReader rdr = new FlowDocumentReader();
FlowDocScl.Document = document;
}
}
}
現在這個「FlowDocScl」現在是一個流文件,需要breaked到頁面在運行時。 在此先感謝。
請閱讀[格式幫助](http://stackoverflow.com/editing-help)並在發佈屠殺代碼之前查看預覽。 – 2011-05-11 11:41:07
對不起,我會照顧我的下一篇文章的格式,但現在即時在gr8需要你的幫助....請幫助解決這個問題。 – Rishabh 2011-05-11 12:18:34
現在Iam打算用一種方式註釋一個流程文檔內容,只有其他文本(如第1,第3,第5 ......)變成有色,而其他文本保持原樣。請在這方面提供任何幫助..... – Rishabh 2011-05-16 13:24:10