8,734
社区成员
发帖
与我相关
我的任务
分享
txtLibraryContentBrief.Blocks.Clear();
Run myRun = new Run();
myRun.Text = m_ClientOperationData.Note;
Paragraph myPara = new Paragraph();
myPara.Inlines.Add(myRun);
txtLibraryContentBrief.Blocks.Add(myPara);
private void txtLibraryContentBrief_TextInputStart(object sender, TextCompositionEventArgs e)
{
string s = "";
for (int i = 0; i < txtLibraryContentBrief.Blocks.Count; i++)
{
Paragraph aPara =(Paragraph) txtLibraryContentBrief.Blocks[i];
for (int j = 0; j < aPara.Inlines.Count; j++)
{
Run aRun =(Run) aPara.Inlines[j];
s = s + aRun.Text;
}
}
//huan hang
if (e.Text == "\r")
{
s = s + "\n";
}
else
{
s = s + e.Text;
}
m_ClientOperationData.Note = s;
}