This example shows how to reflect the ‘Zoom’ value of a DocumentViewer in a TextBlock.
[XAML]
<Window x:Class='SDKSample.Window1'
xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height='*' />
<RowDefinition Height='*' />
</Grid.RowDefinitions>
<DocumentViewer Name='dvZoomSource' Grid.Row='0' />
<TextBlock Grid.Row='1'
Text='{Binding ElementName=dvZoomSource, Path=Zoom, Mode=OneWay}' />
</Grid>
</Window>
Share with