MainWindow.xaml 2.0 KB

123456789101112131415161718192021222324252627282930313233
  1. <Window
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:Preview="clr-namespace:FastReport.Preview;assembly=FastReport.WPF" x:Class="CustomPreview.MainWindow"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="800" Width="1200" UseLayoutRounding="True">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="200"/>
  12. <ColumnDefinition Width="*"/>
  13. </Grid.ColumnDefinitions>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="40"/>
  16. <RowDefinition Height="*"/>
  17. </Grid.RowDefinitions>
  18. <ListBox x:Name="reportsList" SelectionChanged="reportsList_SelectionChanged" Grid.Row="1"/>
  19. <StackPanel Orientation="Horizontal" Grid.Column="1">
  20. <Button Content="Print" Command="{Binding ElementName=previewControl,Path=cmdPrint}" Width="70" Height="20" Margin="10,10,5,10"/>
  21. <Button Content="Export to PDF" Click="ExportToPDF_Click" Width="90" Height="20" Margin="5,10,5,10"/>
  22. <Button Content="&lt;&lt;" Command="{Binding ElementName=previewControl,Path=cmdFirst}" Width="20" Height="20" Margin="50,10,5,10"/>
  23. <Button Content="&lt;" Command="{Binding ElementName=previewControl,Path=cmdPrior}" Width="20" Height="20" Margin="5,10,5,10"/>
  24. <TextBox Text="{Binding ElementName=previewControl,Path=PageNo}" Width="50" Height="20" Margin="5,10,5,10"/>
  25. <Button Content="&gt;" Command="{Binding ElementName=previewControl,Path=cmdNext}" Width="20" Height="20" Margin="5,10,5,10"/>
  26. <Button Content="&gt;&gt;" Command="{Binding ElementName=previewControl,Path=cmdLast}" Width="20" Height="20" Margin="5,10,5,10"/>
  27. </StackPanel>
  28. <Preview:WpfPreviewControl x:Name="previewControl" Grid.Column="1" Grid.Row="1" ToolbarVisible="False" />
  29. </Grid>
  30. </Window>