سؤال

I have a confusion that only button element shows option for command and most of the other elements do not support this option. Is it valid only for Button? And is only Click Event handled by Command?? Because most of the samples i have seen, On clicking button command gets fired. In case i want command to be fired on other events, then what to do?

هل كانت مفيدة؟

المحلول

Yes, there are some limitations like above. A command cannot be bound with the controls that doesn't implement ICommandSource interface. But you can use Dependency Property to write custom commands.

You can see this and this or googling for more examples.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top