flowdocument

Xaml FlowDocument table - how to get the header on each page on a multi-page table?

I've got a XAML FlowDocument containing a table with a lot of rows, spanning multiple pages, and I'm converting this FlowDocument to XPS. Now I'm looking for a way to repeat the header of the table on each page. I see two possible approaches: 1) Get the table to automagically print the header on each page. 2) Somehow by program find...

WPF FlowDocument Paragraph Inlines Length

Is there any limitations to the WPF Document.Paragraph object when using the FlowDocument control? I have the FlowDocument turning blank when I add a Paragraph that is more than 450 lines to the Paragraph. I could not locate anything within the MSDN documentation regarding max. lengths etc. Any ideas why this would happen? ...

Disabling search in a WPF FlowDocument

Hi, I have a FlowDocument that is defined in XAML like this; <FlowDocumentScrollViewer> <FlowDocument> <Paragraph> <Run>Hello</Run> </Paragraph> </FlowDocument> </FlowDocumentScrollViewer> What I'd like to do is prevent the Find and Zoom controls from appearing when you press Ctrl-F or F3. Is this...

Scroll a WPF FlowDocumentScrollViewer from code?

Hi, I have a FlowDocumentScrollViewer I want to automatically scroll to the bottom when text is added. <FlowDocumentScrollViewer Name="Scroller"> <FlowDocument Foreground="White" Name="docDebug" FontFamily="Terminal"> <Paragraph Name="paragraphDebug"/> </FlowDocument> </FlowDocumentScrollViewer> In code I add Inlines to the Parag...

Wavy underlines in a FlowDocument

In WPF, is there an easy way to add wavy underlines (like spelling errors in Word) to FlowDocument elements? There's the Underline class, but there seems to be no way to style it. ...

WPF/XAML: Typography.Capitals seems to have no effect

All of these bits of text look the same, but I am trying to get them to look different. I want small caps text. What am I missing here to get the small caps typography effect to work? To reproduce this, open Visual Studio 2008, Do File|New Project, create a new Windows|WPF application, paste the mark-up below into Window1.xaml, then run...

Inserting an HTML fragment into a WPF FlowDocument

I'm dynamically building a WPF FlowDocument from a datasource. One of the data elements is a fragment of HTML - I need to figure out a way to parse that and insert it into my FlowDocument. I've found HTMLToXAMLConverter which will return a XAML representation of the HTML, but I'm still not sure how to best go about instantiating that X...

WPF Handle links inside FlowDocument

Hello, I'm building simple dictionary application using WPF. I'm using MVVM pattern, databinding and FlowDocument to display words to user. UI consists of 2 controls: ListBox and FlowDocumentScrollViewer. Dictionary data comes from XML file, format of this string may look like this <b>Word</b> - Some description. Another <i>descrip...

Displaying streaming rich text with WPF

I have a WPF application that connects via a socket to a device and gets streaming text data (approx 1 message per second). This data is then displayed on the UI. The user can create rules like "If the data contains 'abc' highlight the line" or "…make it bold", so plain text output will not do, it needs to be "rich" text. My current s...

Sharing FlowDocuments between multiple RichTextBoxes

A WPF FlowDocument can only belong to a single RichTextBox. However, we'd like to use a single document which can be manipulated at different points (in space and time) in the UI. It will never happen that there are two RichTextBoxes simultaneously displaying a single document (and can't, because WPF will complain). Using a MemoryStream...

How to find the position of a FlowDocument Inline or Block element relative to a UIElement?

I am trying to implement features similar to Visual Studio like code region expander/collapser for FlowDocument content. For this, I need to know, for instance, the Y coordinates of where exactly a paragraph begins and ends so that I can draw the adornments. How do I get this information? Here's what I tried: I implemented an invisible ...

How to convert FlowDocument to rtf .

Hi, I have used a WPF RichTextBox to save a flowdocument from it as byte[] in database. Now i need to retrieve this data and display in a report RichTextBox as an rtf. when i try to convert the byte[] using TextRange or in XAMLReader i get a FlowDocument back but how do i convert it to rtf string as the report RichTextBox only takes rtf...

How to show a flowdocument in multiple pages like Word?

I have an project that is much like MS Word and needs to display and Edit a range of pages with contains Rich text and want to show this content onscreen in multiple rich-text-box controls that are stacked vertically and scrolled to create the effect of document flow. Also i would like the content to flow automatically between the contr...

WPF - Work out a width for a FlowDocument

I am working in C# and VS2008. I have a WPF application containing a FlowDocument, which contains a paragraph, which contains a number of fairly short lines (i.e. Spans and LineBreaks). However the length of lines varies. I would like the FlowDocument's width to be large enough to accommodate the longest of these lines without wrapping,...

FlowDocument Memory Issue in C#

I am currently attempting to deal with an issue with releasing a FlowDocument resources. I am loading an rtf file and putting it into a FlowDocument with TextRange.Load. I noticed that after it does this it holds onto those resources and GC doesn't collect it. I have ran a memory profiler and have seen that this is true. I have also narr...

Can you print a Flowdocument Table in WPF with repeatable table column headers

How can you print a Flowdocument Table in WPF with repeatable table column headers? I have seen this one [http://www.codeproject.com/KB/WPF/PimpedDocumentPaginator.aspx] and it does not work. ...

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 contains "Sample Text" in font Segoe UI 11 pt. Now when I load and then save the docume...

FlowDocumentReader Document doesn't get notified when bound source changes, why?

So I have this XAML in the .xaml file <StackPanel> <Button Width="200" Height="30" Content="Change Words" Click="Button_Click"/> <FlowDocumentReader ViewingMode="Scroll" Zoom="90" Focusable="True" Background="White" IsFindEnabled="True" IsPageV...

Making part of a FlowDocument non-selectable

I want to make a FlowDocument that contains both user-specified content, and hyperlinks for manipulating that content. I want the user to be able to highlight the content with the mouse, and copy it to the clipboard. Is there any way to allow that, while preventing the user from highlighting and copying the hyperlinks? (Note that the us...

How can I hide a Paragraph in a FlowDocument?

Is there any way to use databinding to show or hide a Paragraph within a FlowDocument? (I want to use MVVM, but with a FlowDocument as my view.) Paragraph doesn't have a Visibility property. I'm not sure what else to look for. ...