I recently was working on some code where I needed to add a watermark to my WPF TextBox. Now this is not built-in functionality. So i thought of implementing a similar functionality myself.
Getting straight to the point, in this article, I will be explaining how to create command bindings to certain mouse events such a RightClick or a LeftDoubleClick among others.
Now, if you have already worked on some windows 8 apps and cared about keyboard accessiblity, or maybe just from the title of of this post, there is no KeyBinding to perform an action.
Now, if you are on .NET 3.5, you will have noticed that the XAML I have provided does not work. Shown it below again for reference.
You can specify an input binding in XAML as shown below.