Net Maui How to create picker and editor without underline ?

Sami 986 Reputation points
2023-04-20T18:07:07.26+00:00

Net Maui How to create picker and editor without underline ? Andriod and Ios

Developer technologies | .NET | .NET MAUI
{count} votes

Answer accepted by question author
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 50,156 Reputation points Microsoft External Staff
    2023-04-27T07:11:26.87+00:00

    Hello,

    Since Editor and Picker in iOS are not underlined, you could refer to the following code and documentation to implement this function on Android.

    void ModifyControls() 
    {
        Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("EditorCustomization", (handler, view) =>
        {
    #if ANDROID
            handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent);
    #endif
        });
        Microsoft.Maui.Handlers.PickerHandler.Mapper.AppendToMapping("PickerCustomization", (handler, view) =>
        {
    #if ANDROID
            handler.PlatformView.SetBackgroundColor(Android.Graphics.Color.Transparent);
    #endif
        });
    }
    

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.