Question: [How to format specific text in TextBox] #7425
Replies: 5 comments
-
Are you talking about the TextBox. PlaceholderText property? |
Beta Was this translation helpful? Give feedback.
-
No, PlaceholderText displays when there is no text in TextBox. What i'm asking is while typing in TextBox, I need to show the suggestion as like in Win 11 OS. Currently I have behavior as like below |
Beta Was this translation helpful? Give feedback.
-
I dont think there is built in behavior for this. You could achieve this by retemplating (not sure how easy that would be) or put another textblock beneath the AutoSuggestBox/TextBox and achieve the effect that way. |
Beta Was this translation helpful? Give feedback.
-
Textbox does not have this behavior by default. An option to achieve this is to retemplate RichEditBox. |
Beta Was this translation helpful? Give feedback.
-
Hi @jeganraj-m! I took the liberty and created an AutoCompleteTextBox from a custom control. It shows the suggestion inside the TextBox just like you required by overriding the placeholder feature. You can get it as NuGet package or just take the code in the repo. |
Beta Was this translation helpful? Give feedback.
-
In Windows 11 OS, search textbox displays as below
Here the auto append text has a different foreground. How to do this in WinUI TextBox?
Beta Was this translation helpful? Give feedback.
All reactions