LANCommander/LANCommander.Launcher.Avalonia/Views/Components/PdfViewerControl.axaml
Aaron Powell 73cd83c8bd Add PDF viewer for game manuals
- Create custom PdfViewerControl using PDFtoImage library
- Replace AvaloniaPdfViewer (had DynamicData version conflict) with PDFtoImage
- Add page navigation and zoom (DPI) controls to PDF viewer
- Update GameActionBarView with proper MenuFlyout bindings for manuals
- Add OpenFirstManualCommand property for safe binding to first manual
2026-01-23 12:04:38 +11:00

32 lines
1.7 KiB
XML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="LANCommander.Launcher.Avalonia.Views.Components.PdfViewerControl">
<Grid RowDefinitions="Auto,*">
<!-- Toolbar -->
<Border Grid.Row="0"
Padding="8"
Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}">
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Center">
<Button x:Name="PrevPageButton" Content="◀" Padding="8,4" ToolTip.Tip="Previous Page" />
<TextBlock x:Name="PageIndicator" VerticalAlignment="Center" Margin="8,0" />
<Button x:Name="NextPageButton" Content="▶" Padding="8,4" ToolTip.Tip="Next Page" />
<Border Width="1" Background="{DynamicResource SystemControlForegroundBaseMediumBrush}" Margin="8,0" />
<Button x:Name="ZoomOutButton" Content="" Padding="8,4" ToolTip.Tip="Zoom Out" />
<TextBlock x:Name="ZoomIndicator" VerticalAlignment="Center" Margin="8,0" />
<Button x:Name="ZoomInButton" Content="+" Padding="8,4" ToolTip.Tip="Zoom In" />
</StackPanel>
</Border>
<!-- PDF Content -->
<ScrollViewer Grid.Row="1"
HorizontalScrollBarVisibility="Auto"
VerticalScrollBarVisibility="Auto"
x:Name="PdfScrollViewer">
<Image x:Name="PdfImage"
Stretch="None"
HorizontalAlignment="Center"
Margin="16" />
</ScrollViewer>
</Grid>
</UserControl>