AddConcert.xaml 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <Page x:Class="MusicSmth.AddConcert"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:MusicSmth"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="AddConcert"
  10. xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2">
  11. <Page.Resources>
  12. <Style x:Key="FocusVisual">
  13. <Setter Property="Control.Template">
  14. <Setter.Value>
  15. <ControlTemplate>
  16. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  17. </ControlTemplate>
  18. </Setter.Value>
  19. </Setter>
  20. </Style>
  21. <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
  22. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
  23. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
  24. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
  25. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
  26. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
  27. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
  28. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
  29. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
  30. <Style TargetType="{x:Type Button}">
  31. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  32. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  33. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  34. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  35. <Setter Property="BorderThickness" Value="1"/>
  36. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  37. <Setter Property="VerticalContentAlignment" Value="Center"/>
  38. <Setter Property="Padding" Value="1"/>
  39. <Setter Property="Template">
  40. <Setter.Value>
  41. <ControlTemplate TargetType="{x:Type Button}">
  42. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  43. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  44. </Border>
  45. <ControlTemplate.Triggers>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. <Style x:Key="FocusVisual1">
  52. <Setter Property="Control.Template">
  53. <Setter.Value>
  54. <ControlTemplate>
  55. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  56. </ControlTemplate>
  57. </Setter.Value>
  58. </Setter>
  59. </Style>
  60. <SolidColorBrush x:Key="TextBox.Static.Background" Color="#FFFFFFFF"/>
  61. <Style x:Key="ComboBoxEditableTextBox" TargetType="{x:Type TextBox}">
  62. <Setter Property="OverridesDefaultStyle" Value="true"/>
  63. <Setter Property="AllowDrop" Value="true"/>
  64. <Setter Property="MinWidth" Value="0"/>
  65. <Setter Property="MinHeight" Value="0"/>
  66. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  67. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  68. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  69. <Setter Property="Template">
  70. <Setter.Value>
  71. <ControlTemplate TargetType="{x:Type TextBox}">
  72. <ScrollViewer x:Name="PART_ContentHost" Background="Transparent" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  73. </ControlTemplate>
  74. </Setter.Value>
  75. </Setter>
  76. </Style>
  77. <LinearGradientBrush x:Key="ComboBox.Static.Background" EndPoint="0,1" StartPoint="0,0">
  78. <GradientStop Color="#FFF0F0F0" Offset="0.0"/>
  79. <GradientStop Color="#FFE5E5E5" Offset="1.0"/>
  80. </LinearGradientBrush>
  81. <SolidColorBrush x:Key="ComboBox.Static.Border" Color="#FFACACAC"/>
  82. <SolidColorBrush x:Key="ComboBox.Static.Glyph" Color="#FF606060"/>
  83. <SolidColorBrush x:Key="ComboBox.Static.Editable.Background" Color="#FFFFFFFF"/>
  84. <SolidColorBrush x:Key="ComboBox.Static.Editable.Border" Color="#FFABADB3"/>
  85. <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Background" Color="Transparent"/>
  86. <SolidColorBrush x:Key="ComboBox.Static.Editable.Button.Border" Color="Transparent"/>
  87. <LinearGradientBrush x:Key="ComboBox.MouseOver.Background" EndPoint="0,1" StartPoint="0,0">
  88. <GradientStop Color="#FFECF4FC" Offset="0.0"/>
  89. <GradientStop Color="#FFDCECFC" Offset="1.0"/>
  90. </LinearGradientBrush>
  91. <SolidColorBrush x:Key="ComboBox.MouseOver.Border" Color="#FF7EB4EA"/>
  92. <SolidColorBrush x:Key="ComboBox.MouseOver.Glyph" Color="#FF000000"/>
  93. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Background" Color="#FFFFFFFF"/>
  94. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Border" Color="#FF7EB4EA"/>
  95. <LinearGradientBrush x:Key="ComboBox.MouseOver.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
  96. <GradientStop Color="#FFEBF4FC" Offset="0.0"/>
  97. <GradientStop Color="#FFDCECFC" Offset="1.0"/>
  98. </LinearGradientBrush>
  99. <SolidColorBrush x:Key="ComboBox.MouseOver.Editable.Button.Border" Color="#FF7EB4EA"/>
  100. <LinearGradientBrush x:Key="ComboBox.Pressed.Background" EndPoint="0,1" StartPoint="0,0">
  101. <GradientStop Color="#FFDAECFC" Offset="0.0"/>
  102. <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
  103. </LinearGradientBrush>
  104. <SolidColorBrush x:Key="ComboBox.Pressed.Border" Color="#FF569DE5"/>
  105. <SolidColorBrush x:Key="ComboBox.Pressed.Glyph" Color="#FF000000"/>
  106. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Background" Color="#FFFFFFFF"/>
  107. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Border" Color="#FF569DE5"/>
  108. <LinearGradientBrush x:Key="ComboBox.Pressed.Editable.Button.Background" EndPoint="0,1" StartPoint="0,0">
  109. <GradientStop Color="#FFDAEBFC" Offset="0.0"/>
  110. <GradientStop Color="#FFC4E0FC" Offset="1.0"/>
  111. </LinearGradientBrush>
  112. <SolidColorBrush x:Key="ComboBox.Pressed.Editable.Button.Border" Color="#FF569DE5"/>
  113. <SolidColorBrush x:Key="ComboBox.Disabled.Background" Color="#FFF0F0F0"/>
  114. <SolidColorBrush x:Key="ComboBox.Disabled.Border" Color="#FFD9D9D9"/>
  115. <SolidColorBrush x:Key="ComboBox.Disabled.Glyph" Color="#FFBFBFBF"/>
  116. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Background" Color="#FFFFFFFF"/>
  117. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Border" Color="#FFBFBFBF"/>
  118. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Background" Color="Transparent"/>
  119. <SolidColorBrush x:Key="ComboBox.Disabled.Editable.Button.Border" Color="Transparent"/>
  120. <Style x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
  121. <Setter Property="OverridesDefaultStyle" Value="true"/>
  122. <Setter Property="IsTabStop" Value="false"/>
  123. <Setter Property="Focusable" Value="false"/>
  124. <Setter Property="ClickMode" Value="Press"/>
  125. <Setter Property="Template">
  126. <Setter.Value>
  127. <ControlTemplate TargetType="{x:Type ToggleButton}">
  128. <Border x:Name="templateRoot" Background="#0000" BorderBrush="#0000" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  129. <Border x:Name="splitBorder" BorderBrush="White" BorderThickness="0" HorizontalAlignment="Right" Margin="0" SnapsToDevicePixels="true" Width="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}">
  130. <Path x:Name="arrow" Data="F1 M 0,0 L 2.667,2.66665 L 5.3334,0 L 5.3334,-1.78168 L 2.6667,0.88501 L0,-1.78168 L0,0 Z" Fill="{StaticResource ComboBox.Static.Glyph}" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center"/>
  131. </Border>
  132. </Border>
  133. <ControlTemplate.Triggers>
  134. <MultiDataTrigger>
  135. <MultiDataTrigger.Conditions>
  136. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  137. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=Self}}" Value="false"/>
  138. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Mode=Self}}" Value="false"/>
  139. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Mode=Self}}" Value="true"/>
  140. </MultiDataTrigger.Conditions>
  141. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Background}"/>
  142. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Static.Editable.Border}"/>
  143. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Background}"/>
  144. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Static.Editable.Button.Border}"/>
  145. </MultiDataTrigger>
  146. <Trigger Property="IsMouseOver" Value="true">
  147. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.MouseOver.Glyph}"/>
  148. </Trigger>
  149. <MultiDataTrigger>
  150. <MultiDataTrigger.Conditions>
  151. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=Self}}" Value="true"/>
  152. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  153. </MultiDataTrigger.Conditions>
  154. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Background}"/>
  155. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Border}"/>
  156. </MultiDataTrigger>
  157. <MultiDataTrigger>
  158. <MultiDataTrigger.Conditions>
  159. <Condition Binding="{Binding IsMouseOver, RelativeSource={RelativeSource Mode=Self}}" Value="true"/>
  160. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  161. </MultiDataTrigger.Conditions>
  162. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Background}"/>
  163. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.MouseOver.Editable.Border}"/>
  164. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Background}"/>
  165. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.MouseOver.Editable.Button.Border}"/>
  166. </MultiDataTrigger>
  167. <Trigger Property="IsPressed" Value="true">
  168. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Pressed.Glyph}"/>
  169. </Trigger>
  170. <MultiDataTrigger>
  171. <MultiDataTrigger.Conditions>
  172. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Mode=Self}}" Value="true"/>
  173. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  174. </MultiDataTrigger.Conditions>
  175. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Background}"/>
  176. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Border}"/>
  177. </MultiDataTrigger>
  178. <MultiDataTrigger>
  179. <MultiDataTrigger.Conditions>
  180. <Condition Binding="{Binding IsPressed, RelativeSource={RelativeSource Mode=Self}}" Value="true"/>
  181. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  182. </MultiDataTrigger.Conditions>
  183. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Background}"/>
  184. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Pressed.Editable.Border}"/>
  185. <Setter Property="Background" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Background}"/>
  186. <Setter Property="BorderBrush" TargetName="splitBorder" Value="{StaticResource ComboBox.Pressed.Editable.Button.Border}"/>
  187. </MultiDataTrigger>
  188. <Trigger Property="IsEnabled" Value="false">
  189. <Setter Property="Fill" TargetName="arrow" Value="{StaticResource ComboBox.Disabled.Glyph}"/>
  190. </Trigger>
  191. <MultiDataTrigger>
  192. <MultiDataTrigger.Conditions>
  193. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Mode=Self}}" Value="false"/>
  194. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="false"/>
  195. </MultiDataTrigger.Conditions>
  196. <Setter Property="Background" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Background}"/>
  197. <Setter Property="BorderBrush" TargetName="templateRoot" Value="{StaticResource ComboBox.Disabled.Border}"/>
  198. </MultiDataTrigger>
  199. <MultiDataTrigger>
  200. <MultiDataTrigger.Conditions>
  201. <Condition Binding="{Binding IsEnabled, RelativeSource={RelativeSource Mode=Self}}" Value="false"/>
  202. <Condition Binding="{Binding IsEditable, RelativeSource={RelativeSource AncestorType={x:Type ComboBox}}}" Value="true"/>
  203. </MultiDataTrigger.Conditions>
  204. </MultiDataTrigger>
  205. </ControlTemplate.Triggers>
  206. </ControlTemplate>
  207. </Setter.Value>
  208. </Setter>
  209. </Style>
  210. <ControlTemplate x:Key="ComboBoxEditableTemplate" TargetType="{x:Type ComboBox}">
  211. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  212. <Grid.ColumnDefinitions>
  213. <ColumnDefinition Width="*"/>
  214. <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
  215. </Grid.ColumnDefinitions>
  216. <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource Mode=TemplatedParent}}" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  217. <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  218. <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
  219. <ScrollViewer x:Name="DropDownScrollViewer">
  220. <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
  221. <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  222. <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
  223. </Canvas>
  224. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  225. </Grid>
  226. </ScrollViewer>
  227. </Border>
  228. </theme:SystemDropShadowChrome>
  229. </Popup>
  230. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  231. <Border x:Name="border" Background="{StaticResource TextBox.Static.Background}" Margin="{TemplateBinding BorderThickness}">
  232. <TextBox x:Name="PART_EditableTextBox" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" IsReadOnly="{Binding IsReadOnly, RelativeSource={RelativeSource Mode=TemplatedParent}}" Margin="{TemplateBinding Padding}" Style="{StaticResource ComboBoxEditableTextBox}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>
  233. </Border>
  234. </Grid>
  235. <ControlTemplate.Triggers>
  236. <Trigger Property="IsEnabled" Value="false">
  237. <Setter Property="Opacity" TargetName="border" Value="0.56"/>
  238. </Trigger>
  239. <Trigger Property="IsKeyboardFocusWithin" Value="true">
  240. <Setter Property="Foreground" Value="Black"/>
  241. </Trigger>
  242. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  243. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  244. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  245. </Trigger>
  246. <Trigger Property="HasItems" Value="false">
  247. <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
  248. </Trigger>
  249. <MultiTrigger>
  250. <MultiTrigger.Conditions>
  251. <Condition Property="IsGrouping" Value="true"/>
  252. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  253. </MultiTrigger.Conditions>
  254. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  255. </MultiTrigger>
  256. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  257. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  258. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  259. </Trigger>
  260. </ControlTemplate.Triggers>
  261. </ControlTemplate>
  262. <ControlTemplate x:Key="ComboBoxTemplate" TargetType="{x:Type ComboBox}">
  263. <Grid x:Name="templateRoot" SnapsToDevicePixels="true">
  264. <Grid.ColumnDefinitions>
  265. <ColumnDefinition Width="*"/>
  266. <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/>
  267. </Grid.ColumnDefinitions>
  268. <Popup x:Name="PART_Popup" AllowsTransparency="true" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" Margin="1" Placement="Bottom" PopupAnimation="{DynamicResource {x:Static SystemParameters.ComboBoxPopupAnimationKey}}">
  269. <theme:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MinWidth="{Binding ActualWidth, ElementName=templateRoot}" MaxHeight="{TemplateBinding MaxDropDownHeight}">
  270. <Border x:Name="dropDownBorder" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowFrameBrushKey}}" BorderThickness="1">
  271. <ScrollViewer x:Name="DropDownScrollViewer">
  272. <Grid x:Name="grid" RenderOptions.ClearTypeHint="Enabled">
  273. <Canvas x:Name="canvas" HorizontalAlignment="Left" Height="0" VerticalAlignment="Top" Width="0">
  274. <Rectangle x:Name="opaqueRect" Fill="{Binding Background, ElementName=dropDownBorder}" Height="{Binding ActualHeight, ElementName=dropDownBorder}" Width="{Binding ActualWidth, ElementName=dropDownBorder}"/>
  275. </Canvas>
  276. <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
  277. </Grid>
  278. </ScrollViewer>
  279. </Border>
  280. </theme:SystemDropShadowChrome>
  281. </Popup>
  282. <ToggleButton x:Name="toggleButton" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource Mode=TemplatedParent}}" Style="{StaticResource ComboBoxToggleButton}"/>
  283. <ContentPresenter x:Name="contentPresenter" ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" Content="{TemplateBinding SelectionBoxItem}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="false" Margin="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  284. </Grid>
  285. <ControlTemplate.Triggers>
  286. <Trigger Property="HasDropShadow" SourceName="PART_Popup" Value="true">
  287. <Setter Property="Margin" TargetName="shadow" Value="0,0,5,5"/>
  288. <Setter Property="Color" TargetName="shadow" Value="#71000000"/>
  289. </Trigger>
  290. <Trigger Property="HasItems" Value="false">
  291. <Setter Property="Height" TargetName="dropDownBorder" Value="95"/>
  292. </Trigger>
  293. <MultiTrigger>
  294. <MultiTrigger.Conditions>
  295. <Condition Property="IsGrouping" Value="true"/>
  296. <Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false"/>
  297. </MultiTrigger.Conditions>
  298. <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
  299. </MultiTrigger>
  300. <Trigger Property="ScrollViewer.CanContentScroll" SourceName="DropDownScrollViewer" Value="false">
  301. <Setter Property="Canvas.Top" TargetName="opaqueRect" Value="{Binding VerticalOffset, ElementName=DropDownScrollViewer}"/>
  302. <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
  303. </Trigger>
  304. </ControlTemplate.Triggers>
  305. </ControlTemplate>
  306. <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
  307. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
  308. <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
  309. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
  310. <Setter Property="BorderThickness" Value="1"/>
  311. <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
  312. <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
  313. <Setter Property="Padding" Value="6,3,5,3"/>
  314. <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
  315. <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
  316. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  317. <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
  318. <Style.Triggers>
  319. <Trigger Property="IsEditable" Value="true">
  320. <Setter Property="IsTabStop" Value="false"/>
  321. <Setter Property="Padding" Value="2"/>
  322. <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
  323. </Trigger>
  324. </Style.Triggers>
  325. </Style>
  326. </Page.Resources>
  327. <Grid Background="#1DB954">
  328. <Image Source="Doggie.jpg" Stretch="Fill" Opacity="0.1"></Image>
  329. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  330. <TextBlock FontSize="20" HorizontalAlignment="Center">Название</TextBlock>
  331. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  332. <TextBox VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Name" Background="#0000" BorderBrush="#0000" Height="25"></TextBox>
  333. </Border>
  334. <TextBlock FontSize="20" HorizontalAlignment="Center">Исполнитель</TextBlock>
  335. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  336. <ComboBox Style="{DynamicResource ComboBoxStyle1}" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Band" Background="#0000" BorderBrush="#0000" Height="25"></ComboBox>
  337. </Border>
  338. <TextBlock FontSize="20" HorizontalAlignment="Center">Описание</TextBlock>
  339. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black" Width="350">
  340. <TextBox TextWrapping="Wrap" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Disc" Background="#0000" BorderBrush="#0000" Height="75"></TextBox>
  341. </Border>
  342. <TextBlock FontSize="20" HorizontalAlignment="Center">Дата концерта</TextBlock>
  343. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  344. <DatePicker VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="DateConc" Background="#0000" BorderBrush="#0000" Height="25"></DatePicker>
  345. </Border>
  346. <TextBlock FontSize="20" HorizontalAlignment="Center">Место</TextBlock>
  347. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  348. <ComboBox Style="{DynamicResource ComboBoxStyle1}" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Place" Background="#0000" BorderBrush="#0000" Height="25"></ComboBox>
  349. </Border>
  350. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  351. <StackPanel Orientation="Vertical">
  352. <TextBlock FontSize="20" HorizontalAlignment="Center">Самая низкая цена</TextBlock>
  353. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  354. <TextBox VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="LowPrice" Background="#0000" BorderBrush="#0000" Height="25"></TextBox>
  355. </Border>
  356. </StackPanel>
  357. <StackPanel Orientation="Vertical" Margin="10,0,0,0">
  358. <TextBlock FontSize="20" HorizontalAlignment="Center">Самая высокая цена</TextBlock>
  359. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  360. <TextBox VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="HighPrice" Background="#0000" BorderBrush="#0000" Height="25"></TextBox>
  361. </Border>
  362. </StackPanel>
  363. </StackPanel>
  364. <Border Margin="0,20,0,0" Background="Black" CornerRadius="10" Width="150" Height="30">
  365. <Button Click="Add" Height="23" Name="AddConc" Foreground="White" Background="#0000" BorderBrush="#0000">ДОБАВИТЬ</Button>
  366. </Border>
  367. </StackPanel>
  368. <Border HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="10,0,0,10" Background="Black" CornerRadius="10" Width="70" Height="25">
  369. <Button Click="Back" Height="23" Name="BackButton" Foreground="White" Background="#0000" BorderBrush="#0000">Назад</Button>
  370. </Border>
  371. </Grid>
  372. </Page>