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
0
votes
2 answers

How to work with RichTextBox in WPF

I have a WPF application in which I want to convert a TextBox into a RichTextBox. I have already written the following lines of code:
Entwickler582
  • 73
  • 1
  • 7
0
votes
1 answer

C# WPF Printing job is removed when changing one line of code

I have found a strange behaviour while trying to print a FlowDocument which is stored inside the .xaml file. Let me show you how this works. We have a simple ViewModel-like class: public class FooViewModel { public FlowDocument Fd { get; set;…
Mateusz Myślak
  • 775
  • 6
  • 16
0
votes
1 answer

WPF FlowDocument will not fill Viewbox container

I have a WPF usercontrol that I want to load with dynamic content in code using a FlowDocument: textblocks, bulleted lists, etc. Content is loaded as expected. And the box sizes looks fine in designer, but in runtime the FlowDocument insists on…
Jakob Lithner
  • 4,225
  • 6
  • 38
  • 59
0
votes
1 answer

Binding blocks of a Section to another Section

I have a FlowDocument with several Paragraps and Tables, this FlowDocument should repeat itself presenting the exact copy after the middle of the page. I'm using 2 Sections to achieve that. To make thing easy, I'm trying to bind a section to…
Nicke Manarin
  • 3,026
  • 4
  • 37
  • 79
0
votes
1 answer

WPF FlowDocument Displays *Some* Images But Not Others

This is the code I'm using to create the Image that I'm inserting into a FlowDocument. private static Image GetImage(string url) { if (url == null) throw new ArgumentNullException("url"); if (!(url.StartsWith("http://") ||…
Scott Baker
  • 10,013
  • 17
  • 56
  • 102
0
votes
1 answer

Table Rowspan issue flowdocument C#

I am trying to print table using flow-document,with row-span property. I am trying to print below output, but it gives me this I don't understand what's wrong with my code,maybe i have missed something. Any help appreciated.Please see the code…
sp_m
  • 2,647
  • 8
  • 38
  • 62
0
votes
1 answer

Mahapps Metro richtextbox cuts bottom of g letter

My problem with the RichTextBox control is that it cuts off the bottom part of 'g', 'q', and 'j' letters of the last Paragraph added to it. My application is a chat, so it adds one paragraph per message to the FlowDocument of this RichTextBox and it…
user2042930
  • 640
  • 1
  • 7
  • 14
0
votes
0 answers

WPF FlowDocument : Resizing Image by Dragging "Grab Points"?

Is there a built-in control that allows the user to grab the drag points on the corners and/or sides to resize an Image in a FlowDocument? It's common functionality, but I can't find it or any reference on how to implement it.
Scott Baker
  • 10,013
  • 17
  • 56
  • 102
0
votes
1 answer

Inserting columns into a Table

I have a table with 3 columns. Now I want to insert another column, but I want to insert the new column after the first one. Now I'm wondering how this can be done. If I'm not wrong, the Table.Columns property isn't really representing columns, it's…
stefan.at.kotlin
  • 15,347
  • 38
  • 147
  • 270
0
votes
0 answers

Storing Non-Visible (But Required) Information in a FlowDocument

I am trying to write a two-way XHTML to FlowDocument (FD) XSLT transformation, and I'm running into a recurring issue - there are things you can do in HTML that don't make sense (at least in this early version) in a FD. For example, XHTML has the…
Scott Baker
  • 10,013
  • 17
  • 56
  • 102
0
votes
1 answer

How to determine whether two FlowDocuments have the same content?

I'm creating a small text editor using a RichTextBox in WPF. When the editor is closed I'd like to ask the user if he really wants to close, but ONLY IF there are unsaved changes. I made a copy of the RTB's original FlowDocument and want to compare…
DerSöllinger
  • 57
  • 2
  • 8
0
votes
3 answers

WPF- Horizontal and Vertical position of a Run Element in a FlowDocument

Is there anyway to get the horizontal position(pixel) and vertical position(pixel) of a Run element in a FlowDocument? Edit: All i need to do is scroll to that position and make it the top line of the FlowDocument.
Sameera Kumarasingha
  • 2,908
  • 3
  • 25
  • 41
0
votes
1 answer

Alignment issues with flow document reader - WPF

I am trying to load a .txt file onto a flow document reader, but the columns are not correctly aligned, i.e. there is no uniform spacing between the columns. How can I get the same alignment in the flow document, as it is present in the notepad…
Pallavi
  • 119
  • 1
  • 2
  • 10
0
votes
2 answers

Systematically remove first line

I am trying to remove the first line of a paragraph when the total lines exceed a predetermined number of entries. This is for a kind of chat window and I do not want too many lines displayed at one time. private Paragraph paragraph = new…
0
votes
0 answers

WPF FlowDocument Table - change width of columns by mouse

I have to allow a user to change the width of a column and the height of a row for a Table in FlowDocument. In my investigation, I've managed to handle the PreviewMouseLeftButtonDown event for RichTexBox control but not for the table border. I…
mktn
  • 23
  • 3