|
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:bpa="clr-namespace:BPA.UIControl">
-
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/TextBox.xaml" />
- <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/Card.xaml" />
- <ResourceDictionary Source="pack://application:,,,/BPA.UIControl;component/Themes/Clock.xaml" />
- </ResourceDictionary.MergedDictionaries>
-
- <Style x:Key="RubyerDateTimePicker" TargetType="{x:Type bpa:DateTimePicker}">
- <Setter Property="Background" Value="{DynamicResource ControlBackground}" />
- <Setter Property="BorderBrush" Value="{DynamicResource Border}" />
- <Setter Property="Foreground" Value="{DynamicResource DefaultForeground}" />
- <Setter Property="BorderThickness" Value="{DynamicResource DefaultBorderThickness}" />
- <Setter Property="Padding" Value="0 5" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="SelectedDateTimeFormat" Value="yyyy-MM-dd HH:mm" />
- <Setter Property="Validation.ErrorTemplate" Value="{StaticResource RubyerValidationErrorTemplate}" />
- <Setter Property="bpa:ControlHelper.CornerRadius" Value="{DynamicResource AllControlCornerRadius}" />
- <Setter Property="bpa:ControlHelper.FocusBorderBrush" Value="{DynamicResource Primary}" />
- <Setter Property="bpa:ControlHelper.MouseOverBrush" Value="{DynamicResource Primary}" />
- <Setter Property="bpa:HeaderHelper.Background" Value="{DynamicResource Primary}" />
- <Setter Property="bpa:HeaderHelper.Foreground" Value="{DynamicResource WhiteForeground}" />
- <Setter Property="bpa:HeaderHelper.FontSize" Value="18" />
- <Setter Property="bpa:HeaderHelper.FontWeight" Value="Normal" />
- <Setter Property="bpa:HeaderHelper.HorizontalAlignment" Value="Center" />
- <Setter Property="bpa:HeaderHelper.VerticalAlignment" Value="Center" />
- <Setter Property="bpa:HeaderHelper.Padding" Value="5" />
- <Setter Property="Focusable" Value="False" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type bpa:DateTimePicker}">
- <Grid x:Name="PART_Root">
- <TextBox x:Name="PART_TextBox"
- Style="{StaticResource RubyerTextBox}"
- Grid.Row="0"
- Grid.Column="0"
- Height="Auto"
- Padding="{TemplateBinding Padding}"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- bpa:ControlHelper.CornerRadius="{Binding Path=(bpa:ControlHelper.CornerRadius), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:ControlHelper.FocusBorderBrush="{Binding Path=(bpa:ControlHelper.FocusBorderBrush), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:ControlHelper.MouseOverBrush="{Binding Path=(bpa:ControlHelper.MouseOverBrush), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:InputBoxHelper.InternalSpacing="{Binding Path=(bpa:InputBoxHelper.InternalSpacing), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:InputBoxHelper.IsClearable="{Binding Path=(bpa:InputBoxHelper.IsClearable), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:InputBoxHelper.PreContent="{Binding Path=(bpa:InputBoxHelper.PreContent), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- bpa:InputBoxHelper.Watermark="{Binding Path=(bpa:InputBoxHelper.Watermark), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- Background="{TemplateBinding Background}"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- Foreground="{TemplateBinding Foreground}">
- <bpa:InputBoxHelper.PostContent>
- <Button x:Name="PART_Button"
- Style="{StaticResource TextButton}"
- Padding="2"
- bpa:ButtonHelper.Shape="Circle"
- Focusable="False"
- Foreground="{DynamicResource SeconarydText}">
- <bpa:Icon Type="CalendarTodoFill" />
- </Button>
- </bpa:InputBoxHelper.PostContent>
- </TextBox>
- <Grid x:Name="PART_DisabledVisual"
- Grid.Row="0"
- IsHitTestVisible="False"
- Opacity="0">
- <Popup x:Name="PART_Popup"
- AllowsTransparency="True"
- Placement="Bottom"
- PlacementTarget="{Binding ElementName=PART_TextBox}"
- PopupAnimation="Fade"
- StaysOpen="False"
- VerticalOffset="5">
- <bpa:Card Margin="5"
- Padding="0"
- Background="{DynamicResource FloatBackground}"
- BorderThickness="0">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Border x:Name="title"
- Grid.Row="0"
- Padding="{Binding Path=(bpa:HeaderHelper.Padding), RelativeSource={RelativeSource Mode=TemplatedParent}}"
- CornerRadius="{DynamicResource TopContainerCornerRadius}" />
-
- <Border Grid.Row="1">
- <StackPanel Orientation="Horizontal">
- <Calendar x:Name="PART_Calendar"
- Margin="0"
- bpa:ControlHelper.CornerRadius="0"
- bpa:HeaderHelper.Background="Transparent"
- bpa:HeaderHelper.Foreground="{DynamicResource DefaultForeground}"
- Background="Transparent" />
- <Border BorderBrush="{DynamicResource BorderLighter}" BorderThickness="1 0 0 0" />
- <bpa:Clock x:Name="PART_Clock"
- Height="{Binding ActualHeight, ElementName=PART_Calendar}"
- Margin="0"
- bpa:ControlHelper.CornerRadius="0"
- Background="Transparent"
- IsShowConfirmButton="False" />
- </StackPanel>
- </Border>
-
- <Button x:Name="PART_ConfirmButton"
- Grid.Row="2"
- Margin="5"
- Content="{DynamicResource I18N_Clock_Ok}" />
- </Grid>
- </bpa:Card>
- </Popup>
- </Grid>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="bpa:InputBoxHelper.IsRound" Value="True">
- <Setter Property="bpa:ControlHelper.CornerRadius" Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}, Converter={StaticResource HalfOfDoubleConverter}}" />
- </Trigger>
- <Trigger Property="Validation.HasError" Value="True">
- <Setter Property="BorderBrush" Value="{DynamicResource Error}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <!-- Filled DateTimePicker -->
- <Style x:Key="FilledDateTimePicker"
- BasedOn="{StaticResource RubyerDateTimePicker}"
- TargetType="{x:Type bpa:DateTimePicker}">
- <Setter Property="BorderBrush" Value="{DynamicResource BorderLighter}" />
- <Setter Property="Background" Value="{DynamicResource BorderLighter}" />
- <Setter Property="bpa:ControlHelper.MouseOverBrush" Value="{DynamicResource BorderLight}" />
- </Style>
- </ResourceDictionary>
|