How to customize a caret of TextBox in UWP?

水 知 125 Reputation points
2024-09-28T15:26:26.3066667+00:00

I want to make customized TextBox and I don't know how to customize the caret in UWP.

I thought of these ways to make it:

  1. Change the style of the original caret directly
  2. Use a rectangle and let it blink, but how to hide the original caret or how to make the new one blink at the same time as the orignal one?
  3. Remake a TextBox, but how to do it and make it support IME?

Please help!

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Junjie Zhu - MSFT 18,476 Reputation points Microsoft Vendor
    2024-10-10T03:21:50+00:00

    Hello @水 知 ,

    To summarize this question. Currently, there is no public API in UWP that can achieve caret with rounded edges on the top and bottom, only simple modifications can be implemented in UWP.

    Thank you.


Your answer

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