Xamarin.Forms 选择器选择背景颜色

Xamarin.Forms Picker Selection BackgroundColor

我正在寻找有关如何在 Xamarin Forms 中更改选择器(日期和时间)颜色的正确修复方法。我已经有了自定义渲染器来自定义对话框,但是是否也有类似的可能性来一次在所有实例上自定义显示的选择器本身的背景颜色(以及烦人的粉红色线)? 我找到了如何制作它,但我的解决方案并不那么优雅,因为我必须在整个应用程序的每个实例上定义背景颜色。

-> 我希望 16:00 后面的蓝框消失

我的图片代码如下:

               <TimePicker Grid.Row="5"
                            Grid.Column="0"
                            x:Name="BtnTime2"
                            Format="t"/>

                <Button Grid.Row="5"
                        Grid.Column="1"
                        x:Name="BtnTime2Now"
                        CornerRadius="15"/>

                <DatePicker Grid.Row="6"
                            Grid.Column="0"
                            Grid.ColumnSpan="2"
                            x:Name="BtnDate"
                            Format="D"
                            BackgroundColor="#00000000"/>

希望大家能帮帮我

好吧没关系... 我已经在 App.xaml

中找到了解决方案
<Application xmlns="http://xamarin.com/schemas/2014/forms"
         xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
         x:Class="Arbeitszeitrechner_Forms.App">
<Application.Resources>
    <ResourceDictionary>
        
        ...some more Styles here...

        <Style TargetType="TimePicker">
            <Setter Property="BackgroundColor" Value="#00000000"/>
            <Setter Property="TextColor" Value="{StaticResource Text}"/>
        </Style>
        <Style TargetType="DatePicker">
            <Setter Property="BackgroundColor" Value="#00000000"/>
            <Setter Property="TextColor" Value="{StaticResource Text}"/>
        </Style>
    </ResourceDictionary>
</Application.Resources>