Disable Zoom in FlowDocument

154 Views Asked by At

In flow documents there's this ugly zoom "feature" that you can zoom in and out. I searched and I found this to remove it:

<FlowDocumentScrollViewer VerticalScrollBarVisibility="Hidden" FontSize="40">
        <FlowDocument>
            <!--content-->
        </FlowDocument>
</FlowDocumentScrollViewer>

But you can still zoom with Ctrl+MouseWheel. Is there anything I can do to disable this?

1

There are 1 best solutions below

0
Étienne Laneville On BEST ANSWER

You can set MinZoom and MaxZoom to 100:

<FlowDocumentScrollViewer VerticalScrollBarVisibility="Hidden"
                            FontSize="40" MinZoom="100" MaxZoom="100">
    <FlowDocument>
            <Paragraph>
                <Bold>Some bold text in the paragraph.</Bold>
                Some text that is not bold.
            </Paragraph>

            <List>
                <ListItem>
                    <Paragraph>ListItem 1</Paragraph>
                </ListItem>
                <ListItem>
                    <Paragraph>ListItem 2</Paragraph>
                </ListItem>
                <ListItem>
                    <Paragraph>ListItem 3</Paragraph>
                </ListItem>
            </List>
    </FlowDocument>
</FlowDocumentScrollViewer>