flowdocument

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 would like to create a bulleted list (<List>) out of the contents of an ObservableCollec...

How to display html content converted into xaml flowdocument in wpf application

My objective is to display html content in wpf application. I use brwoser control but this always goes on top of window. I search through the net and found a solution to convert the html into a flow document. But my question is how to use the conveted flowdocument in wpf application to show the html content Please refer the below articl...

WPF FlowDocument Scale to Fit Page

I have a FlowDocument that varies in height due to an ItemsControl in a BlockUIContainer. In some cases, the ItemsControl extends beyond the page height. Is there a way to scale the FlowDocument to fit a page (8.5" X 11") right before printing if needed? As of right now, the FlowDocument is named 'doc' and the method for printing I am u...

WPF: How to embed button inside text flow (wrap text around button)?

Hi everyone, I'd like an advice to the following problem: I want to embed a button into a text flow, but when I embed a Button and Label (or TextBlock) into the WrapPanel, I get the first figure: I think that one of solutions could be FlowDocument, but I feel that this is far too heavy for a control simple like this (which could be us...

Point at a given Run flow document wpf

Hi, I've got a FlowDocumentPageViewer with dynamic content. The flow document is made of paragraphs, each run in the paragraph contains a word. I'm trying to navigate to a given run, so I got the method which will return me the run I want. But once I got this Run how can I navigate to it, with automatic page change? For example I sele...

Flowdocument isnt using the full width/height

Hi i have a FlowDocument which i want to fill the entire width and height of my window. I have tried using the flowdocumentpageViewer (no luck) and are now using a documentpageview. I still cant get it to dock/fill the entire space, its just sitting in the middle, in the minimum size it can create (does it make sense?) here is my code: ...

FlowDocumentScrollViewer won't scroll

I'm trying to find the most expandable way to show a flowdocument inside a window - just a flowdocument. I have Then in the constructor for the Window, I set the Document of the viewer to one I load from XAML (in code). The XAML contains: ...

WPF: display a website in a flowdocument

Hi, Im trying to display a website (http://www.google.com) in a flowdocument i got. Found a demo on the web where this guy makes a hyperlink in a flowdocument and that link points to the google webaddress. Clicking the link makes the google website open in the flowdocument. How to do this in codebehind? i have tried the following without...

Print flowDocument block on differnt pages

I am printing a FlowDocument using flowing Code PrintDialog dialog = new PrintDialog(); var value = dialog.ShowDialog(); if (value.HasValue && value.Value == true) { XpsDocumentWriter writer = PrintQueue.CreateXpsDocumentWriter(dialog.PrintQueue); PageImageableArea imageArea =...

WPF RichTextBox scrolling

The richtextbox component in my WPF app is populated using a FlowDocument and the RTB's "Document" property. rtb.ScrollToEnd(); doesn't seem to do anything, and i've even tried calling BringIntoView() on the last "row" added to the table that structures my FlowDocument. Any Suggestions? Thanks! ...

How to print a WPF flow document table across multiple pages if there are too many columns to fit on one page?

Hi! I think the question title is self-explaining. I have a flow document with a table which has too many columns to fit on one page. Is there a way to print the columns across multiple pages? c1 = Column 1 c2 = Column 2 etc. +-------------+ +-------------+ | Page 1 | | Page 2 | | | | | | c1 c2 c3 c4...

WPF Documents: How to create paragraphs of "underlines" on which you can write answers to questionnaires

I am creating an application that is meant to print out forms meant to be filled in by humans writing on paper. These documents follow a question and answer style. Typically you have paragraphs with an "underline" style onto which a free-form answer of paragraph length can be written. How would you create this using WPF Documents? Here...

Why does my table get not printed when I try to define column widths?

Hi! I'm printing a table using WPF FlowDocument. It works as long as I don't assign any width to the table columns. Once I set the width to any custom value (not auto), the printer output is empty. Does anybody have some ideas why this happens? Best Regards Oliver Hanappi ...

WPF FlowDocument Table - AutoFit option?

I want a table to logically size the columns according to the contents. Is this possible in WPF? Here is the code I'm working with: <Window x:Class="FlowDocument.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Wi...

Colorize FlowDocument

Hi. I'm using C# 3.0 and I have following FlowDocument: var doc = new FlowDocument(); var p = new Paragraph(); p.Inlines.Add(new Run("Hello 777 world 777")); doc.Blocks.Add(p); How can I wrap all "777" substrings with Hyperlink programmaly? I need to get a document, where all "777" were hyperlinks. ...

Document Paginator

How to override our own paginator instead of documentPaginator for a flowDocumentPageViewer - ...

Why I cannot drop files from explorer to FlowDocumentReader and how to fix it?

I'm trying to implement a piece of functionality that will let the user to drag files into an application to be opened in the FlowDocumentReader. My problem is that is though I have AllowDrop=true on the FlowDocumentReader, the cursor does not change to the "drop here" icon but changes instead to "drop is not allowed" icon. This happens...

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 FlowDocument to a TextBox, the button is not copied. It is possible to somehow convert the inline ...

Repeating databound item in WPF FlowDocument

Hello, I have a flowdocument in WPF that looks like this: <FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Paragraph FontFamily="Georgia"> <StackPanel> <TextBlock Text="{Binding Path=Title}"/> <Tex...

Blocks to UIElement conversion

Hai is it possible to convert a 'System.Windows.Documents.Block' to 'System.Windows.UIElement' . I need this as i want to add the blocks i created to a fixed document.is there any other way? thanx alot ...