首页 > 解决方案 > 如何在 Xamarin Mac 中更改 Picker 的颜色?

问题描述

我的 Xamarin mac 应用程序上有一个选择器,我想更改背景颜色和边框颜色(蓝色),我该怎么做?

在此处输入图像描述

Picker picker1 = new Picker { Items = { translateExt.transltR("Option1"), "Option2", "Option3" }, SelectedIndex = outputMode, WidthRequest = 210, TextColor = Color.FromHex(fileManagerPlatform.getColorText()), VerticalOptions = LayoutOptions.CenterAndExpand};
picker1.BackgroundColor = Color.Transparent;

之前的代码适用于 Android、iOs、UWP 以更改背景颜色,但不适用于 Mac。

标签: colorsxamarin.formspickerxamarin.mac

解决方案


推荐阅读