接上一篇生成二维码,这篇就是里面的图片预览并且打印
<Window x:Class="程序名.PrintPreviewWin"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
BorderThickness="0" AllowsTransparency="True" ResizeMode="CanResize" Background="Transparent"
BorderBrush="Transparent" WindowStartupLocation="CenterScreen" WindowStyle="None"
FontSize="28" Height="800" Width="600">
<Border Background="#FFFFFFFF" CornerRadius="6" Margin="5">
<Border.Effect>
<DropShadowEffect Opacity="1" Direction="0" BlurRadius="10" ShadowDepth="0"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="38"></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Border Background="#f0f0f0" />
<Button Margin="10 0 0 0" Width="80" Height="48" HorizontalAlignment="Left"
Style="{StaticResource BlueButton}" Content="打印" FontSize="12"
Command="{Binding PrintCommand}" CommandParameter="{Binding ElementName=border}"/>
<Image Source="/Images/Login/Close.png" Stretch="None" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="PreviewMouseUp">
<i:InvokeCommandAction Command="{Binding CloseCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Image>
<Viewbox Stretch="Uniform" Grid.Row="1">
<Border Background="#a0a0a0">
&n