Skumar
Skumar

Reputation:

wpf Mouseclick on textbox

how to set the command and command parameter on mouseclick on textbox in xaml?

Upvotes: 1

Views: 3201

Answers (4)

Kent Boogaart
Kent Boogaart

Reputation: 178630

You can use attached command behaviors.

Upvotes: 0

user244974
user244974

Reputation:

As Ortis Mallum answered, the PreviewMouseDown event does work.

Upvotes: 1

Sauron
Sauron

Reputation: 16903

Use the PreviewMouseDown of textbox.

Upvotes: 3

user1228
user1228

Reputation:

TextBoxes don't extend from ButtonBase and therefore don't work with Commands. What you're trying to do is wrong. You should ask another question that states your requirements and asks how best to go about achieving them.

Upvotes: 1

Related Questions