来自按钮 xamarin 的灰色
Gray color from button xamarin
我写在Xamarin.FormsPCL。我从我的按钮中设置了 BorderRadius,但是如果我将其设置为禁用或按下它,则显示没有 Border Radius 的灰色边框:
我想清除灰色边框或设置边框半径。
Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0), generic.xaml
includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls.
如果您在 Application.Resources(Xamarin.UWP 客户端项目)中覆盖它,如下所示:
<Application.Resources>
<SolidColorBrush x:Key="ButtonBackgroundPressed" Color="White" />
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="White" />
</Application.Resources>
它应该会影响到所有地方。
我写在Xamarin.FormsPCL。我从我的按钮中设置了 BorderRadius,但是如果我将其设置为禁用或按下它,则显示没有 Border Radius 的灰色边框:
我想清除灰色边框或设置边框半径。
Starting in Windows 10, version 1607 (Windows Software Development Kit (SDK) version 10.0.14393.0),
generic.xaml
includes resources that you can use to modify the colors of a control in different visual states without modifying the control template. In apps that target this software development kit (SDK) or later, modifying these resources is preferred to setting properties such as Background and Foreground. For more info, see the Light-weight styling section of the Styling controls.
如果您在 Application.Resources(Xamarin.UWP 客户端项目)中覆盖它,如下所示:
<Application.Resources>
<SolidColorBrush x:Key="ButtonBackgroundPressed" Color="White" />
<SolidColorBrush x:Key="ButtonBackgroundPointerOver" Color="White" />
</Application.Resources>
它应该会影响到所有地方。