

Maybe there are better ways for this part like somehow setting themes. This is your Settings button in the lower-left corner of the Start menu. 2 Click the gear icon on the bottom-left. This button looks like the Windows icon in the lower-left corner of your screen. Use in any view: xmlns:views="clr-namespace:mauicursor"īut to use dark and light mode you would probably have to programaticaly detect if it is dark or light mode and recreate views. Method 1 Using PC Settings on Windows Download Article 1 Open the Start menu on your computer. Handlers.AddHandler(typeof(CursorEntry), typeof(CursorEntryHandler)) Internal void SetCursorColor(CursorEntry entry) _nativeEntry = new AppCompatEditText(Context) Protected override AppCompatEditText CreatePlatformView() In Platforms Android create : namespace mauicursor Public partial class CursorEntryHandler : EntryHandler If (entry is CursorEntry cursorEntry & entryHandler is CursorEntryHandler cursorEntryHandler) Private void MapCursorEntry(IEntryHandler entryHandler, IEntry entry) Mapper.AppendToMapping("CursorEntr圜ustomization", MapCursorEntry) Public sealed partial class CursorEntryHandler : EntryHandler Set => SetValue(CursorColorProperty, value) ĬursorEntryHandler.cs: namespace mauicursor Get => (Color)GetValue(CursorColorProperty) Nameof(CursorColor), typeof(Color), typeof(CursorEntry), Colors.Black) Public static BindableProperty CursorColorProperty = BindableProperty.Create( Other solution would be to create custom Entry:ĬursorEntry.cs: public class CursorEntry : Entry Mapper.AppendToMapping("CursorColor", (handler, view) => To change entry cursor color You could use EntryHandler and write in it android native code.Īpp.xaml.cs: public partial class App : Application I don't think there is a easy way to add cursor color to MAUI styles.
