How to bind TextBox.InnerLeftContent/InnerLeftContent to an image? #15832
-
Hi experts, I want to show an icon on the left part of the text box (more accurately, the left part of an AutoCompleteBox). The following is a captured example to show a search icon: There have been some discussions. Its definition: Thank you very much! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not sure what you might be doing, but you should specify the control for the icon: <AutoCompleteBox Text="Search">
<AutoCompleteBox.InnerLeftContent>
<PathIcon RenderTransform="scaley(-1)" Data="M203 213c53 0 96 43 96 96s-43 96 -96 96s-96 -43 -96 -96s43 -96 96 -96zM331 213l106 -106l-32 -32l-106 106v17l-6 6c-24 -21 -56 -33 -90 -33c-77 0 -139 61 -139 138s62 139 139 139s138 -62 138 -139c0 -34 -12 -66 -33 -90l6 -6h17z" />
</AutoCompleteBox.InnerLeftContent>
</AutoCompleteBox> I'm using a It's also a new feature on |
Beta Was this translation helpful? Give feedback.
Not sure what you might be doing, but you should specify the control for the icon:
I'm using a
<PathIcon>
here, but you could use an<Image>
instead.It's also a new feature on
AutoCompleteBox
for 11.1, so you should be using 11.1.0-beta2.