How can I set an initial delay on a RepeatButton(before first click event is fired) when ClickMode is ‘Hover’ ?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Looking at the code in Reflector, ButtonBase calls OnClick from OnMouseEnter if ClickMode is set to Hover, so there is nothing you can set that will prevent that initial click. You could subclass RepeatButton and try to completely suppress the OnClick call if it’s made during OnMouseEnter:
If you want that to work for other ClickMode values, you could do something similar for OnKeyDown, OnKeyUp, OnLeftMouseButtonDown, and OnLeftMouseButtonUp.