Questions tagged [flowdocument]

Microsoft's WPF FlowDocument technology allows to render embedded, dynamically adjusted and re-flowing document content that supports columns, pagination and search.

A flow document is designed to "reflow content" depending on window size, device resolution, and other environment variables. Flow content can be complex, consisting of various elements including text, images, tables. In addition, flow documents have a number of built in features including search, viewing modes that optimize readability, and the ability to change the size and appearance of fonts.

571 questions
7
votes
1 answer

How can I copy WPF FlowDocument InlineUIContainer contents?

I have a WPF FlowDocument that has a few InlineUIContainers, these are simple InlineUIContainers, that contain a styled button with some text in the Button.Content. When I copy the text and InlineUIContainer containing the button from the…
Luke
  • 6,195
  • 11
  • 57
  • 85
7
votes
4 answers

WPF FlowDocument Table - AutoFit option?

I want a table to logically size the columns according to the contents. Is this possible in WPF? alt text http://img43.imageshack.us/img43/2640/flowdocument.jpg Here is the code I'm working with:
Andrew Shepherd
  • 44,254
  • 30
  • 139
  • 205
7
votes
1 answer

Retaining font size when loading/saving RTF in WPF

Consider the following RTF document {\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fprq2\fcharset0 Segoe UI;}{\f1\fswiss\fcharset0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs22 Sample Text\f1\fs20\par } It…
Sven Künzler
  • 1,650
  • 1
  • 20
  • 22
6
votes
1 answer

How to make interactable or click-able in WPF UI

This is my first day to design UI using WPF. I have looked up MSDN official document of Flow Document and found that I can place an UI control inside a RichTextBox. I did put a button in but found it's not interactable - I cannot click on it as it's…
JXITC
  • 1,110
  • 1
  • 13
  • 27
6
votes
3 answers

FlowDocument (XPS) with Windows Update KB5020880 (CVE-2022-41089)

On 13. Dezember 2022 Microsoft made a Windows Update KB5020880 (CVE-2022-41089) for .NET 4.8.1 which should fix security problem on XPS. Since then the FlowDocument, which will be rendered to XPS, will not show local images anymore. I do need local…
jaz
  • 228
  • 2
  • 14
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
1 answer

How can I create subclass of class Inline ? (the one used in FlowDocument)

In WPF I would like to create custom Inline implementation. From documentation of Inline: "An abstract class that provides a base for all inline flow content elements." Classes like Figure, Run or Span inherit from Inline. My custom class inheriting…
Rasto
  • 17,204
  • 47
  • 154
  • 245
6
votes
4 answers

Finding all Images in a FlowDocument

Since I am pretty new to WPF FlowDocuments I would like to ask if the code below is correct. It is supposed to return all Images contained in a FlowDocument as List: List FindAllImagesInParagraph(Paragraph paragraph) { List result…
Oliver Weichhold
  • 10,259
  • 5
  • 45
  • 87
6
votes
2 answers

WPF: Printing FlowDocument without Print Dialog

I am writing a note-taking application in WPF, using a FlowDocument for each individual note. The app searches and filters notes by tags. I want to print all notes in the current filtered list as separate documents, and I only want to show a single…
David Veeneman
  • 18,912
  • 32
  • 122
  • 187
6
votes
2 answers

Creating blob properties with Entity Framework 4?

I am creating an EF4 model-first application with a WPF UI. One of the controls on my UI is a RichTextDocument, which outputs a WPF FlowDocument. I can either serialize the FlowDocument to a byte array, or extract its XAML markup as a string. I…
David Veeneman
  • 18,912
  • 32
  • 122
  • 187
6
votes
3 answers

WPF Printing Flow Document

Greetings, I have a problem with printing in WPF. I am creating a flow document and add some controls to that flow document. Print Preview works ok and i have no problem with printing from a print preview window. The problem exists when I print…
user189627
6
votes
4 answers

Detect FlowDocument Change and Scroll

I want to detect (preferably through an event) when any content is added, changed, etc. in a FlowDocument and when it does I want to cause a FlowDocumentScrollViewer displaying the FlowDocument to automatically scroll to the end.
Jason Kresowaty
  • 16,105
  • 9
  • 57
  • 84
6
votes
3 answers

Is there an ItemsControl equivalent for text content?

I have some data that I want to present in a FlowDocument. This will basically be a view that explains the data in a friendly way, with section headers, paragraphs of text, etc., and which I will display in a FlowDocumentScrollViewer. To this end, I…
Joe White
  • 94,807
  • 60
  • 220
  • 330
5
votes
1 answer

Getting a flowdocument from a xaml template file

I got a Xaml file that starts like this:
Slampen
  • 790
  • 9
  • 21
5
votes
1 answer

WPF RichTextBox GetCharacterRect

I am trying to get the character rect for all characters typed inside a richtextbox. Starting from the MyRichTextBox.Document.ContentStart textpointer, I advance every character using the following code currentPointer =…
Manoj
  • 5,011
  • 12
  • 52
  • 76