Articles in this section

How to customize toolbar icon in UWP PDF Viewer

The UWP PDF Viewer does not have a toolbar by default. A custom toolbar project illustrating all the features that can be executed using the PDF Viewer has been shared. The toolbar buttons' content is provided with the PathIcon. You can customize this by changing the data value of the PathIcon associated with the respective buttons. The user guide documentation for creating a custom toolbar illustrates the creation of a complete toolbar for the PDF Viewer. Refer to the following code example in which the data of the PathIcon has to be changed.

XAML

<Grid x:Name="BookmarkToolbar" Grid.Row="1" Grid.Column="0" Background="#1d1d1d" BorderThickness="0 0.5 0 0" BorderBrush="#707070">
            <Button ToolTipService.ToolTip="Bookmarks" Style="{StaticResource ButtonStyle}" x:Name="BookmarkButton" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0 0 0 0" Click="Bookmark_Click" IsEnabled="False">
                <PathIcon x:Name="iconBookmark" Data="M1.0000001,0.99999984 L1.0000001,13.516996 4.5640029,10.176009 8,13.516996 8,0.99999984 z M0,0 L1.0000001,0 8,0 9,0 9,0.99999984 9,13.516996 9,15.884 7.3030014,14.234006 4.5520019,11.559003 1.6839981,14.247007 0,15.824995 0,13.516996 0,0.99999984 z" HorizontalAlignment="Center" Height="18" VerticalAlignment="Center" Width="9"/>
            </Button>
</Grid>
Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied