星火微课系统客户端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

PrintWindow.xaml 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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="btnAdd" Content="+" Click="BtnAdd_Click"/>
  67. <Button Cursor="Hand" Grid.Row="1" x:Name="btnLess" Content="-" Click="BtnLess_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. <Views:ZJClippingBorder Grid.Row="0" x:Name="tip_outer" Margin="0" Background="#FFE6EAF0" CornerRadius="4" Visibility="Collapsed">
  75. <Grid>
  76. <Label Content="打印中..." HorizontalAlignment="Center" Margin="0,20,0,0" Height="35" VerticalAlignment="Top" FontSize="20"></Label>
  77. <ProgressBar BorderBrush="#4597FF"
  78. Foreground="#4597FF"
  79. Grid.Row="0"
  80. x:Name="pgbProcess"
  81. Height="20"
  82. Margin="50,20,50,0"
  83. Visibility="Visible" />
  84. <Label Grid.Row="0"
  85. HorizontalAlignment="Center" Width="60"
  86. x:Name="lbProcess"
  87. Height="30"
  88. Margin="0,20,0,0"
  89. FontSize="16"
  90. Content=""
  91. Foreground="White"
  92. Visibility="Visible" />
  93. </Grid>
  94. </Views:ZJClippingBorder>
  95. <Grid Grid.Row="1">
  96. <Image x:Name="imgPri"/>
  97. </Grid>
  98. <Button
  99. x:Name="btnPrint"
  100. Grid.Row="8"
  101. Width="115"
  102. Height="46"
  103. Click="BtnPrint_Click"
  104. Content="打印"
  105. Foreground="White"
  106. FontSize="17"
  107. IsDefault="True"
  108. Cursor="Hand"
  109. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  110. <Button.Template>
  111. <ControlTemplate TargetType="{x:Type Button}">
  112. <Border
  113. BorderBrush="{TemplateBinding Control.BorderBrush}"
  114. BorderThickness="1"
  115. CornerRadius="7">
  116. <Border.Background>#2E8CF0</Border.Background>
  117. <ContentPresenter
  118. HorizontalAlignment="Center"
  119. VerticalAlignment="Center"
  120. Content="{TemplateBinding ContentControl.Content}" />
  121. </Border>
  122. </ControlTemplate>
  123. </Button.Template>
  124. </Button>
  125. </Grid>
  126. </Viewbox>
  127. </Window>