Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 667
petko_stankoski Avatar asked Aug 13 '26 02:08

petko_stankoski


1 Answers

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>
like image 147
J.H. Avatar answered Aug 14 '26 16:08

J.H.