Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateTimePicker里面的自定义CalendarX样式时<Setter Property="IsTodayHighlighted" Value="True" />显示有问题 #285

Open
Sandf123hehe opened this issue Sep 30, 2024 · 0 comments

Comments

@Sandf123hehe
Copy link
Collaborator

 <pu:DateTimePicker
     Width="250"
     Height="40"
     pu:DropDownHelper.MinWidth="NaN"
     pu:DropDownHelper.Width="NaN"
     ClearButtonVisibility="VisibleOnHoverAndNonnull"
     CornerRadius="10,10,10,10"
     ItemsCheckedBackground="#36AAF7"
     ItemsCheckedBorderBrush="#36AAF7"
     ItemsCheckedBorderThickness="2"
     ItemsCheckedCornerRadius="5,5,5,5"
     ItemsCornerRadius="5,5,5,5"
     ItemsHoverBackground="#36AAF7"
     ItemsHoverCornerRadius="5,5,5,5"
     Mode="DateTime"
     >
     <pu:DateTimePicker.CalendarXStyle>
         <Style BasedOn="{StaticResource {x:Static pu:DateTimePicker.CalendarXStyleKey}}" TargetType="pu:CalendarX">
             <Setter Property="ItemsCornerRadius" Value="5" />
             <Setter Property="ItemsCheckedBackground" Value="#36AAF7" />
             <Setter Property="ItemsCheckedForeground" Value="#FFFFFF" />
             <Setter Property="IsTodayHighlighted" Value="True" />
             <Setter Property="ItemsHoverBackground" Value="#36AAF7" />
             <Setter Property="ItemsCheckedCornerRadius" Value="10,10,10,10" />
             <Setter Property="ItemsCheckedBackground" Value="#36AAF7" />
             <Setter Property="ItemsHoverCornerRadius" Value="10,10,10,10" />
             <Setter Property="Background" Value="#FFFFFF" />
             <Setter Property="HeaderSeparatorVisibility" Value="Visible" />
             <Setter Property="HeaderSeparatorThickness" Value="1" />
             <Setter Property="Width" Value="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=pu:DateTimePicker}}" />
         </Style>
     </pu:DateTimePicker.CalendarXStyle>
     <pu:DateTimePicker.TimeSelectorStyle>
         <Style BasedOn="{StaticResource {x:Static pu:DateTimePicker.TimeSelectorStyleKey}}" TargetType="pu:TimeSelector">
             <Setter Property="ItemsCornerRadius" Value="5" />
             <Setter Property="ItemsCheckedBackground" Value="#36AAF7" />
             <Setter Property="ItemsCheckedForeground" Value="#FFFFFF" />
             <Setter Property="Width" Value="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=pu:DateTimePicker}}" />
         </Style>
     </pu:DateTimePicker.TimeSelectorStyle>
 </pu:DateTimePicker>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant