星火微课系统客户端
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.

PrintWindowTStudy.xaml 6.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <Window x:Class="XHWK.WKTool.PrintWindowTStudy"
  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="PrintWindowTStudy" 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. <Grid x:Name="GridContent" Height="600">
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="120"/>
  36. <RowDefinition Height="*"/>
  37. <RowDefinition Height="80"/>
  38. </Grid.RowDefinitions>
  39. <Grid Grid.Row="0" Background="#E6EAF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  40. <Grid.RowDefinitions>
  41. <RowDefinition Height="50"/>
  42. <RowDefinition Height="50"/>
  43. <RowDefinition Height="*"/>
  44. </Grid.RowDefinitions>
  45. <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}">
  46. </Button>
  47. <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
  48. <TextBlock Text="打印机:" FontSize="20" Padding="0,5,0,0"/>
  49. <ComboBox Cursor="Hand" Width="210"
  50. x:Name="cmbClass"
  51. Padding="30,0,10,0"
  52. VerticalContentAlignment="Center"
  53. BorderThickness="0"
  54. DisplayMemberPath="Value"
  55. FontSize="14"
  56. SelectedValuePath="Key"
  57. />
  58. <TextBlock Text="份数:" FontSize="20" Margin="80,0,0,0" Padding="0,5,0,0" HorizontalAlignment="Right"/>
  59. <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
  60. <Grid>
  61. <Grid.RowDefinitions>
  62. <RowDefinition Height="auto"/>
  63. <RowDefinition Height="auto"/>
  64. </Grid.RowDefinitions>
  65. <Button Cursor="Hand" Grid.Row="0" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
  66. <Button Cursor="Hand" Grid.Row="1" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
  67. </Grid>
  68. <!--<TextBlock Text="点型:" FontSize="20" Margin="120,10,0,0"/>
  69. <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16" Margin="0,15,0,0" IsChecked="True"/>
  70. <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16" Margin="0,15,0,0"/>-->
  71. </StackPanel>
  72. </Grid>
  73. <Views:ZJClippingBorder Grid.Row="0" x:Name="tip_outer" Margin="0" Background="#FFE6EAF0" CornerRadius="4" Visibility="Collapsed">
  74. <Grid>
  75. <Label Content="打印中..." HorizontalAlignment="Center" Margin="0,20,0,0" Height="35" VerticalAlignment="Top" FontSize="20"></Label>
  76. <ProgressBar BorderBrush="#4597FF"
  77. Foreground="#4597FF"
  78. Grid.Row="0"
  79. x:Name="pgbProcess"
  80. Height="20"
  81. Margin="50,20,50,0"
  82. Visibility="Visible" />
  83. <Label Grid.Row="0"
  84. HorizontalAlignment="Center" Width="60"
  85. x:Name="lbProcess"
  86. Height="30"
  87. Margin="0,20,0,0"
  88. FontSize="16"
  89. Content=""
  90. Foreground="White"
  91. Visibility="Visible" />
  92. </Grid>
  93. </Views:ZJClippingBorder>
  94. <Grid Grid.Row="1">
  95. <Image x:Name="imgPri"/>
  96. </Grid>
  97. <Button
  98. x:Name="btnPrint"
  99. Grid.Row="2"
  100. Width="115"
  101. Height="46"
  102. Click="BtnPrint_Click"
  103. Content="打印"
  104. Foreground="White"
  105. FontSize="17"
  106. IsDefault="True"
  107. Cursor="Hand"
  108. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
  109. <Button.Template>
  110. <ControlTemplate TargetType="{x:Type Button}">
  111. <Border
  112. BorderBrush="{TemplateBinding Control.BorderBrush}"
  113. BorderThickness="1"
  114. CornerRadius="7">
  115. <Border.Background>#2E8CF0</Border.Background>
  116. <ContentPresenter
  117. HorizontalAlignment="Center"
  118. VerticalAlignment="Center"
  119. Content="{TemplateBinding ContentControl.Content}" />
  120. </Border>
  121. </ControlTemplate>
  122. </Button.Template>
  123. </Button>
  124. </Grid>
  125. </Window>