星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PrintWindow.xaml 6.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <Window x:Class="XHWK.WKTool.PrintWindow"
  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:local="clr-namespace:XHWK.WKTool" xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
  7. mc:Ignorable="d"
  8. Title="PrintWindow" Height="600" Width="900" AllowsTransparency="True"
  9. ShowInTaskbar="False"
  10. WindowStartupLocation="CenterOwner"
  11. WindowStyle="None" BorderThickness="7">
  12. <Window.Effect>
  13. <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
  14. </Window.Effect>
  15. <Window.Resources>
  16. <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
  17. <Setter Property="BorderThickness" Value="1"/>
  18. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  19. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  20. <Setter Property="VerticalContentAlignment" Value="Center"/>
  21. <Setter Property="Padding" Value="1"/>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type Button}">
  25. <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  26. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  27. </Border>
  28. </ControlTemplate>
  29. </Setter.Value>
  30. </Setter>
  31. </Style>
  32. </Window.Resources>
  33. <Viewbox>
  34. <Grid x:Name="GridContent" Height="600" Width="900">
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="120"/>
  37. <RowDefinition Height="*"/>
  38. <RowDefinition Height="80"/>
  39. </Grid.RowDefinitions>
  40. <Grid Grid.Row="0" Background="#E6EAF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="50"/>
  43. <RowDefinition Height="50"/>
  44. <RowDefinition Height="*"/>
  45. </Grid.RowDefinitions>
  46. <Button Cursor="Hand" Grid.Row="0" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,10,0" Click="BtnClose_Click" Style="{StaticResource NoMouseOverButtonStyle}">
  47. </Button>
  48. <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
  49. <TextBlock Text="打印机:" FontSize="20" Padding="0,5,0,0"/>
  50. <ComboBox Cursor="Hand" Width="210"
  51. x:Name="cmbClass"
  52. Padding="30,0,10,0"
  53. VerticalContentAlignment="Center"
  54. BorderThickness="0"
  55. DisplayMemberPath="Value"
  56. FontSize="14"
  57. SelectedValuePath="Key"
  58. />
  59. <TextBlock Text="份数:" FontSize="20" Margin="80,0,0,0" Padding="0,5,0,0" HorizontalAlignment="Right"/>
  60. <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
  61. <Grid>
  62. <Grid.RowDefinitions>
  63. <RowDefinition Height="auto"/>
  64. <RowDefinition Height="auto"/>
  65. </Grid.RowDefinitions>
  66. <Button Cursor="Hand" Grid.Row="0" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
  67. <Button Cursor="Hand" Grid.Row="1" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
  68. </Grid>
  69. <!--<TextBlock Text="点型:" FontSize="20" Margin="120,10,0,0"/>
  70. <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16" Margin="0,15,0,0" IsChecked="True"/>
  71. <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16" Margin="0,15,0,0"/>-->
  72. </StackPanel>
  73. </Grid>
  74. <Grid Grid.Row="1">
  75. <Image x:Name="imgPri"/>
  76. </Grid>
  77. <Button
  78. x:Name="btnPrint"
  79. Grid.Row="8"
  80. Width="115"
  81. Height="46"
  82. Click="BtnPrint_Click"
  83. Content="打印"
  84. Foreground="White"
  85. FontSize="17"
  86. IsDefault="True"
  87. Cursor="Hand"
  88. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  89. <Button.Template>
  90. <ControlTemplate TargetType="{x:Type Button}">
  91. <Border
  92. BorderBrush="{TemplateBinding Control.BorderBrush}"
  93. BorderThickness="1"
  94. CornerRadius="7">
  95. <Border.Background>#2E8CF0</Border.Background>
  96. <ContentPresenter
  97. HorizontalAlignment="Center"
  98. VerticalAlignment="Center"
  99. Content="{TemplateBinding ContentControl.Content}" />
  100. </Border>
  101. </ControlTemplate>
  102. </Button.Template>
  103. </Button>
  104. <Views:ZJClippingBorder
  105. x:Name="tip_outer"
  106. Width="760"
  107. Height="44"
  108. Margin="0,30,0,0"
  109. HorizontalAlignment="Center"
  110. VerticalAlignment="Center"
  111. Background="#FAFAFA"
  112. CornerRadius="4"
  113. Visibility="Collapsed">
  114. <Grid>
  115. <ProgressBar BorderBrush="#4597FF"
  116. Foreground="#4597FF"
  117. Grid.Row="0"
  118. x:Name="pgbProcess"
  119. Height="20"
  120. Margin="0,0,0,0"
  121. Visibility="Visible" />
  122. <Label Grid.Row="0"
  123. HorizontalAlignment="Center" Width="100"
  124. x:Name="lbProcess"
  125. Height="30"
  126. Margin="0,0,0,0"
  127. FontSize="16"
  128. Content=""
  129. Foreground="White"
  130. Visibility="Visible" />
  131. </Grid>
  132. </Views:ZJClippingBorder>
  133. </Grid>
  134. </Viewbox>
  135. </Window>