星火直播PC
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ToolbarWindow.xaml 6.2KB

4 лет назад
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. <Window x:Class="XHZB.Desktop.ToolbarWindow"
  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:gifLib="http://wpfanimatedgif.codeplex.com"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:local="clr-namespace:XHZB.Desktop" xmlns:views1="clr-namespace:Common.ZB;assembly=Common"
  8. Title="ToolbarWindow" Width="276"
  9. Height="568"
  10. AllowsTransparency="True"
  11. Background="Transparent"
  12. BorderThickness="1"
  13. Closed="toolbar_win_Closed"
  14. ContentRendered="toolbar_win_ContentRendered"
  15. Loaded="toolbar_win_Loaded"
  16. Opacity="1"
  17. ResizeMode="NoResize"
  18. ShowInTaskbar="False"
  19. WindowStyle="None"
  20. mc:Ignorable="d">
  21. <Window.Resources>
  22. <DataTemplate x:Key="ToolbarMenu">
  23. <Button
  24. x:Name="toolbar_item"
  25. Height="73"
  26. Background="Transparent"
  27. BorderBrush="Transparent"
  28. BorderThickness="0"
  29. Click="toolbar_item_Click"
  30. Cursor="Hand">
  31. <Button.Content>
  32. <StackPanel Width="Auto" Background="Transparent">
  33. <Image
  34. Width="43"
  35. HorizontalAlignment="Center"
  36. gifLib:ImageBehavior.AnimatedSource="{Binding Pic}" />
  37. <TextBlock
  38. Padding="0,2,1,0"
  39. HorizontalAlignment="Center"
  40. FontSize="14"
  41. Foreground="#3C525B"
  42. Text="{Binding Name}" />
  43. </StackPanel>
  44. </Button.Content>
  45. </Button>
  46. </DataTemplate>
  47. </Window.Resources>
  48. <Canvas Background="Transparent" ClipToBounds="True">
  49. <views1:ClippingBorder
  50. x:Name="toolbar"
  51. Canvas.Right="24"
  52. Canvas.Bottom="96"
  53. Width="77"
  54. Height="450"
  55. Padding="0,0,0,0"
  56. Background="#f3f3f3"
  57. BorderBrush="#66000000"
  58. BorderThickness="1"
  59. ClipToBounds="True"
  60. CornerRadius="10">
  61. <ItemsControl
  62. x:Name="toolbar_list"
  63. Grid.Row="0"
  64. Width="77"
  65. Height="666"
  66. BorderThickness="0"
  67. ItemTemplate="{StaticResource ToolbarMenu}"
  68. ItemsSource="{Binding menuList}"
  69. ScrollViewer.HorizontalScrollBarVisibility="Disabled"
  70. ScrollViewer.VerticalScrollBarVisibility="Disabled" />
  71. </views1:ClippingBorder>
  72. <Grid
  73. Canvas.Right="0"
  74. Canvas.Bottom="0"
  75. Width="125"
  76. Height="122"
  77. Margin="0,0,0,0">
  78. <Image Width="auto" HorizontalAlignment="Center">
  79. <Image.Style>
  80. <Style TargetType="Image">
  81. <Style.Triggers>
  82. <DataTrigger Binding="{Binding IsOpen}" Value="true">
  83. <Setter Property="Source" Value="./Images/ToolBar/toolbar_bottom2_0.png" />
  84. </DataTrigger>
  85. <DataTrigger Binding="{Binding IsOpen}" Value="false">
  86. <Setter Property="Source" Value="./Images/ToolBar/toolbar_bottom2.png" />
  87. </DataTrigger>
  88. </Style.Triggers>
  89. </Style>
  90. </Image.Style>
  91. </Image>
  92. <TextBlock
  93. x:Name="txbName"
  94. Margin="0,65,0,0"
  95. HorizontalAlignment="Center"
  96. FontSize="18"
  97. FontWeight="Black"
  98. Foreground="White"
  99. Text="" />
  100. <Rectangle
  101. Width="auto"
  102. Height="auto"
  103. Cursor="SizeAll"
  104. Fill="Transparent"
  105. MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
  106. MouseLeftButtonUp="Rectangle_MouseLeftButtonUp"
  107. MouseMove="Rectangle_MouseMove" />
  108. </Grid>
  109. <UniformGrid
  110. Name="ketangTool"
  111. Canvas.Top="238"
  112. Canvas.Right="100"
  113. Width="0"
  114. Height="73"
  115. Background="#f3f3f3"
  116. Rows="1">
  117. <Button
  118. x:Name="heiban_btn"
  119. Background="Transparent"
  120. BorderBrush="Transparent"
  121. BorderThickness="0"
  122. Cursor="Hand">
  123. <Button.Content>
  124. <StackPanel Width="Auto" Background="Transparent">
  125. <Image
  126. Width="43"
  127. HorizontalAlignment="Center"
  128. Source="./Images/ToolBar/黑板01@2x.png" />
  129. <TextBlock
  130. Padding="0,2,0,0"
  131. HorizontalAlignment="Center"
  132. FontSize="14"
  133. Foreground="#3C525B"
  134. Text="黑板" />
  135. </StackPanel>
  136. </Button.Content>
  137. </Button>
  138. <Button
  139. x:Name="pizhu_btn"
  140. Background="Transparent"
  141. BorderBrush="Transparent"
  142. BorderThickness="0"
  143. Cursor="Hand">
  144. <Button.Content>
  145. <StackPanel Width="Auto" Background="Transparent">
  146. <Image
  147. Width="43"
  148. HorizontalAlignment="Center"
  149. Source="./Images/ToolBar/讲评@2x.png" />
  150. <TextBlock
  151. Padding="0,2,0,0"
  152. HorizontalAlignment="Center"
  153. FontSize="14"
  154. Foreground="#3C525B"
  155. Text="批注" />
  156. </StackPanel>
  157. </Button.Content>
  158. </Button>
  159. </UniformGrid>
  160. </Canvas>
  161. </Window>