Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

142 Zeilen
9.9 KiB

  1. <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:bpa="clr-namespace:BPA.UIControl">
  4. <ResourceDictionary.MergedDictionaries>
  5. <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/TextBox.xaml" />
  6. <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/Card.xaml" />
  7. <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/Clock.xaml" />
  8. </ResourceDictionary.MergedDictionaries>
  9. <Style x:Key="RubyerDateTimePicker" TargetType="{x:Type bpa:DateTimePicker}">
  10. <Setter Property="Background" Value="{DynamicResource ControlBackground}" />
  11. <Setter Property="BorderBrush" Value="{DynamicResource Border}" />
  12. <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}" />
  13. <Setter Property="BorderThickness" Value="{DynamicResource DefaultBorderThickness}" />
  14. <Setter Property="Padding" Value="0 5" />
  15. <Setter Property="SnapsToDevicePixels" Value="True" />
  16. <Setter Property="HorizontalContentAlignment" Value="Stretch" />
  17. <Setter Property="VerticalContentAlignment" Value="Center" />
  18. <Setter Property="SelectedDateTimeFormat" Value="yyyy-MM-dd HH:mm" />
  19. <Setter Property="Validation.ErrorTemplate" Value="{StaticResource RubyerValidationErrorTemplate}" />
  20. <Setter Property="bpa:ControlHelper.CornerRadius" Value="{DynamicResource AllControlCornerRadius}" />
  21. <Setter Property="bpa:ControlHelper.FocusBorderBrush" Value="{DynamicResource Primary}" />
  22. <Setter Property="bpa:ControlHelper.MouseOverBrush" Value="{DynamicResource Primary}" />
  23. <Setter Property="bpa:HeaderHelper.Background" Value="{DynamicResource Primary}" />
  24. <Setter Property="bpa:HeaderHelper.Foreground" Value="{DynamicResource WhiteForeground}" />
  25. <Setter Property="bpa:HeaderHelper.FontSize" Value="18" />
  26. <Setter Property="bpa:HeaderHelper.FontWeight" Value="Normal" />
  27. <Setter Property="bpa:HeaderHelper.HorizontalAlignment" Value="Center" />
  28. <Setter Property="bpa:HeaderHelper.VerticalAlignment" Value="Center" />
  29. <Setter Property="bpa:HeaderHelper.Padding" Value="5" />
  30. <Setter Property="Focusable" Value="False" />
  31. <Setter Property="Template">
  32. <Setter.Value>
  33. <ControlTemplate TargetType="{x:Type bpa:DateTimePicker}">
  34. <Grid x:Name="PART_Root">
  35. <TextBox x:Name="PART_TextBox"
  36. Style="{StaticResource RubyerTextBox}"
  37. Grid.Row="0"
  38. Grid.Column="0"
  39. Height="Auto"
  40. Padding="{TemplateBinding Padding}"
  41. HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
  42. VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
  43. bpa:ControlHelper.CornerRadius="{Binding Path=(bpa:ControlHelper.CornerRadius), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  44. bpa:ControlHelper.FocusBorderBrush="{Binding Path=(bpa:ControlHelper.FocusBorderBrush), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  45. bpa:ControlHelper.MouseOverBrush="{Binding Path=(bpa:ControlHelper.MouseOverBrush), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  46. bpa:InputBoxHelper.InternalSpacing="{Binding Path=(bpa:InputBoxHelper.InternalSpacing), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  47. bpa:InputBoxHelper.IsClearable="{Binding Path=(bpa:InputBoxHelper.IsClearable), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  48. bpa:InputBoxHelper.PreContent="{Binding Path=(bpa:InputBoxHelper.PreContent), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  49. bpa:InputBoxHelper.Watermark="{Binding Path=(bpa:InputBoxHelper.Watermark), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  50. Background="{TemplateBinding Background}"
  51. BorderBrush="{TemplateBinding BorderBrush}"
  52. BorderThickness="{TemplateBinding BorderThickness}"
  53. Foreground="{TemplateBinding Foreground}">
  54. <bpa:InputBoxHelper.PostContent>
  55. <Button x:Name="PART_Button"
  56. Style="{StaticResource TextButton}"
  57. Padding="2"
  58. bpa:ButtonHelper.Shape="Circle"
  59. Focusable="False"
  60. Foreground="{DynamicResource SeconarydText}">
  61. <bpa:Icon Type="CalendarTodoFill" />
  62. </Button>
  63. </bpa:InputBoxHelper.PostContent>
  64. </TextBox>
  65. <Grid x:Name="PART_DisabledVisual"
  66. Grid.Row="0"
  67. IsHitTestVisible="False"
  68. Opacity="0">
  69. <Popup x:Name="PART_Popup"
  70. AllowsTransparency="True"
  71. Placement="Bottom"
  72. PlacementTarget="{Binding ElementName=PART_TextBox}"
  73. PopupAnimation="Fade"
  74. StaysOpen="False"
  75. VerticalOffset="5">
  76. <bpa:Card Margin="5"
  77. Padding="0"
  78. Background="{DynamicResource FloatBackground}"
  79. BorderThickness="0">
  80. <Grid>
  81. <Grid.RowDefinitions>
  82. <RowDefinition Height="Auto" />
  83. <RowDefinition Height="Auto" />
  84. <RowDefinition Height="Auto" />
  85. </Grid.RowDefinitions>
  86. <Border x:Name="title"
  87. Grid.Row="0"
  88. Padding="{Binding Path=(bpa:HeaderHelper.Padding), RelativeSource={RelativeSource Mode=TemplatedParent}}"
  89. CornerRadius="{DynamicResource TopContainerCornerRadius}" />
  90. <Border Grid.Row="1">
  91. <StackPanel Orientation="Horizontal">
  92. <Calendar x:Name="PART_Calendar"
  93. Margin="0"
  94. bpa:ControlHelper.CornerRadius="0"
  95. bpa:HeaderHelper.Background="Transparent"
  96. bpa:HeaderHelper.Foreground="{DynamicResource DefaultForeground}"
  97. Background="Transparent" />
  98. <Border BorderBrush="{DynamicResource BorderLighter}" BorderThickness="1 0 0 0" />
  99. <bpa:Clock x:Name="PART_Clock"
  100. Height="{Binding ActualHeight, ElementName=PART_Calendar}"
  101. Margin="0"
  102. bpa:ControlHelper.CornerRadius="0"
  103. Background="Transparent"
  104. IsShowConfirmButton="False" />
  105. </StackPanel>
  106. </Border>
  107. <Button x:Name="PART_ConfirmButton"
  108. Grid.Row="2"
  109. Margin="5"
  110. Content="{DynamicResource I18N_Clock_Ok}" />
  111. </Grid>
  112. </bpa:Card>
  113. </Popup>
  114. </Grid>
  115. </Grid>
  116. <ControlTemplate.Triggers>
  117. <Trigger Property="bpa:InputBoxHelper.IsRound" Value="True">
  118. <Setter Property="bpa:ControlHelper.CornerRadius" Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}, Converter={StaticResource HalfOfDoubleConverter}}" />
  119. </Trigger>
  120. <Trigger Property="Validation.HasError" Value="True">
  121. <Setter Property="BorderBrush" Value="{DynamicResource Error}" />
  122. </Trigger>
  123. </ControlTemplate.Triggers>
  124. </ControlTemplate>
  125. </Setter.Value>
  126. </Setter>
  127. </Style>
  128. <!-- Filled DateTimePicker -->
  129. <Style x:Key="FilledDateTimePicker"
  130. BasedOn="{StaticResource RubyerDateTimePicker}"
  131. TargetType="{x:Type bpa:DateTimePicker}">
  132. <Setter Property="BorderBrush" Value="{DynamicResource BorderLighter}" />
  133. <Setter Property="Background" Value="{DynamicResource BorderLighter}" />
  134. <Setter Property="bpa:ControlHelper.MouseOverBrush" Value="{DynamicResource BorderLight}" />
  135. </Style>
  136. </ResourceDictionary>