Eingabecursorfarbe auf iOS
Diese plattformspezifische iOS-Plattform legt die Cursorfarbe einer Entry
bestimmten Farbe fest. Es wird in XAML verbraucht, indem die Entry.CursorColor
bindungsfähige Eigenschaft auf eine Color
:
<ContentPage ...
xmlns:ios="clr-namespace:Xamarin.Forms.PlatformConfiguration.iOSSpecific;assembly=Xamarin.Forms.Core">
<StackLayout>
<Entry ... ios:Entry.CursorColor="LimeGreen" />
</StackLayout>
</ContentPage>
Alternativ kann sie über die Fluent-API von C# genutzt werden:
using Xamarin.Forms.PlatformConfiguration;
using Xamarin.Forms.PlatformConfiguration.iOSSpecific;
...
var entry = new Xamarin.Forms.Entry();
entry.On<iOS>().SetCursorColor(Color.LimeGreen);
Die Entry.On<iOS>
Methode gibt an, dass diese plattformspezifische Methode nur auf iOS ausgeführt wird. Die Entry.SetCursorColor
Methode im Xamarin.Forms.PlatformConfiguration.iOSSpecific
Namespace legt die Cursorfarbe auf eine angegebene .Color
Darüber hinaus kann die Entry.GetCursorColor
Methode verwendet werden, um die aktuelle Cursorfarbe abzurufen.
Das Ergebnis ist, dass die Cursorfarbe in einer Entry
bestimmten :Color