petko_stankoski
petko_stankoski

Reputation: 10713

Removing toolbar from FlowDocumentReader

I have a WPF app. In a window I want to show some text like this:

enter image description here

The text will be divided in 2 columns. I can do that with FlowDocumentReader. The problem is, I don't want the toolbar on the bottom to be shown (the one with zoom, page turn, search, etc.). I tried using FlowDocumentScrollViewer instead of FlowDocumentReader, the text isn't shown in 2 columns anymore.

How can I remove the toolbar on the bottom?

Upvotes: 3

Views: 1412

Answers (1)

J.H.
J.H.

Reputation: 4322

You could do it with a template. It is too much XAML for me to post (it won't let me) so here is how to do it yourself.

In Visual Studio (I'm using VS 2013), in the Document Outline window, right-click your FlowDocumentReader. Select Edit Template->Edit a Copy... enter image description here

You will get the "Create ControlTemplate Resource" window: enter image description here

Click OK. The third line of the template is the bottom grid/toolbar. Add Visibility="Collapsed" to it and it will not be visible.

<Grid Visibility="Collapsed" Background="{TemplateBinding Background}" DockPanel.Dock="Bottom" HorizontalAlignment="Stretch" Uid="Grid_31">...</Grid>

Upvotes: 6

Related Questions