Questions tagged [flowdocumentreader]

Questions regarding .NET FlowDocumentReader Class

FlowDocumentReader Class is part of .NET Framework's System.Windows.Controls

Provides a control for viewing flow content, with built-in support for multiple viewing modes.

Docs: https://msdn.microsoft.com/en-us/library/system.windows.controls.flowdocumentreader%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396

46 questions
6
votes
1 answer

Why can't I paste text copied from a WPF FlowDocumentScrollViewer or Reader?

In a previous question I was trying to find out how to bind an ObservableCollection to a control so I could both see all the strings and select all the strings and copy them from the content control. The answers to that question eventually got me…
6
votes
2 answers

Hide controls in FlowDocumentReader

Is it possible to hide controls at the bottom like zoom slider, page navigation etc in FlowDocumentReader? It seems that only search can be hidden through the IsFindEnabled property.
Dan
  • 11,077
  • 20
  • 84
  • 119
4
votes
2 answers

WPF XPS Redaction

I like DocumentViewer for display of an XPS document in a WPF application. But I also need to redact the XPS document. I have found stand alone applications (.exe) for redacting XPS. What I need is a WPF control for view and redaction of XPS. …
paparazzo
  • 44,497
  • 23
  • 105
  • 176
4
votes
2 answers

Adding a menu item to a FlowDocumentReader ContextMenu

The FlowDocumentReader has two menu items in its ContextMenu, Copy and Select All. I'd like to add an additional MenuItem to it and have tried this: private void FlowDocumentReader_ContextMenuOpening(object sender, ContextMenuEventArgs e) …
itsmatt
  • 31,265
  • 10
  • 100
  • 164
4
votes
1 answer

How can I add multiple FlowDocumentReaders to a StackPanel?

Thanks to Leom's answer I was able to add a FlowDocument to a StackPanel by wrapping it in a FlowDocumentReader. But now I have two problems: it seems only the first FlowDocumentReader is added and the rest ignored there is an unwanted margin that…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
2
votes
1 answer

FlowDocumentScrollViewer vs FlowDocumentPageViewer

I have 2 possible ways to display my FlowDocument: FlowDocumentScrollViewer Upside: - This just presents me the data, with no attention to pages, so the user simply scrolls through everything. On printing I can add a header and a footer and the…
2
votes
1 answer

RichTextBox becomes ReadOnly when binding it to content from inside FlowDocumentReader

Question: In the btnRevert_Click(...) event of the following code, how can we make the RichTextBox editable? In my WPF .NET5 app, the btnTest_Click(...) event successfully displays the contents of a RichTextBox into a FlowDocumentReader (fdReader).…
nam
  • 21,967
  • 37
  • 158
  • 332
2
votes
0 answers

FlowDocumentReader - carriage return line feed characters are added to the end of text that has none

I'm adding text to a FlowDocumentReader within a single paragraph like this FlowDocumentReader fdr = new FlowDocumentReader(); fdr.Document = new FlowDocument(); Paragraph p = new Paragraph(); Run r = new Run("some…
erotavlas
  • 4,274
  • 4
  • 45
  • 104
2
votes
2 answers

Writing out FlowDocument xaml with namespace using XmlWriter

I've got a collection of data that needs to be converted to a .xaml file that can later be loaded as a FlowDocument into a FlowDocumentReader. I don't directly instantiate Paragraphs, Runs, rather I generate the xaml to create the document…
itsmatt
  • 31,265
  • 10
  • 100
  • 164
2
votes
2 answers

How to determine the width of content or size a container to content

EDIT: Ok, it's kind of solved, but it feels dirty: foreach (ContainerVisual cv in SurfaceNYTR.Helpers.VFTreeHelper.FindVisualChildren(flowDocReader)) { if (cv.Parent.DependencyObjectType.SystemType.FullName ==…
ISVK
  • 21
  • 3
2
votes
0 answers

Design-time document for FlowDocument

I am trying to set the document of FlowDocumentReader at design-time but cannot figure out how to do it in a pure declarative way. There is no design-time attribute for Document and using DataContext does not work (for obvious reasons I think). What…
marcys
  • 21
  • 3
2
votes
2 answers

How to goto particular page number in flowdocument reader through code in WPF?

There is a pagenumber property in flowdocument reader.But that property is readonly. Is there any way to goto particular page number in flowdocument reader.Please help. Thanks.
Ershad
  • 947
  • 2
  • 20
  • 40
1
vote
1 answer

How to enable hyperlinks in FlowDocument?

I have .htm files in my database, which are converted to FlowDocument and placed into FlowDocumentReader for viewing. The .htm files have hyperlinks inside them: 1)internal(to other fragments of document) 2)external(to other .htm documents in my…
khurshed_nosirov
  • 248
  • 4
  • 20
1
vote
1 answer

WPF Binding IsAsync Fail

Have an object with most of properties very lightweight - text up to 200 character. One property is FlowDocument that can be large and want to retrieve it Async. It fails when I set Async = True with the message: "The calling thread cannot access…
paparazzo
  • 44,497
  • 23
  • 105
  • 176
1
vote
1 answer

FlowDocument has too much white space on lines

Following btnTest_Click(...) event in my WPF .NET5 app successfully displays the content of a RichTextBox into a FlowDocumentReader. But, as shown in the images below, the different page viewing modes of the FlowDocumentReader create excessive…
nam
  • 21,967
  • 37
  • 158
  • 332
1
2 3 4