Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan McGovern <alan.mcgovern@gmail.com>2016-05-09 14:23:03 +0300
committerAlan McGovern <alan.mcgovern@gmail.com>2016-05-09 14:23:03 +0300
commitb687c5caec500a2f97842ddc4362435856ed12b8 (patch)
treef7f539f5abba309394f68b753a5248267211394b
parentaee0178b30664d95b897af6d7b321bffdb869164 (diff)
[Xwt.Wpf] Fix RichTextViewBackend.PlainText
The previous implementation returned the raw xml generated by the RichTextView, but what we actually wanted was the plain text content of the FlowDocument we generated.
-rwxr-xr-xXwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs b/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
index b782cf3d..37225ad7 100755
--- a/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
+++ b/Xwt.WPF/Xwt.WPFBackend/RichTextViewBackend.cs
@@ -291,11 +291,11 @@ namespace Xwt.WPFBackend
public string PlainText {
get {
- return builder.ToString ();
+ var flowDoc = ToFlowDocument();
+ string text = new TextRange (flowDoc.ContentStart, flowDoc.ContentEnd).Text;
+ return text;
}
}
}
-
-
}
}