Skip to content

How to add an event to a Trailing Icon on textbox? #3142

Closed Answered by nicolaihenriksen
MatthewGuo93 asked this question in Q&A
Discussion options

You must be logged in to vote

@MatthewGuo93 Currently I don't think you have built-in options for doing that.

I guess it could be worth creating an attached event TextFieldAssist.TrailingIconClicked which could be invoked when the icon is clicked. This could be "wired up" when the TextFieldAssist.HasTrailingIcon is set. Anyways this will require changes in the library and does not help you out right now.

So if you want to "solve" your problem right now, you would probably need to resort to something like the handling the PreviewMouseDown event (or similar) and then inspecting if the mouse is currently over the icon.

Disclaimer: This approach is very hacky, and relies on knowledge of the MDIX style involved; in other w…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@MatthewGuo93
Comment options

Answer selected by MatthewGuo93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants