none
XBAP中,MouseLeftButtonUp,动画的Completed等事件无法触发,为什么? RRS feed

  • 问题

  • XBAP中,MouseLeftButtonUp,动画的Completed等事件无法触发,为什么?

    .NET 4.5,在IE中,其它的事件如CLICK都可以触发,但是按钮的MouseLeftButtonUp,DoubleAnimation的Completed都无法触发,打了断点,根本就进不去,怎么办?

    2015年3月19日 4:46

答案

  • Hello,

    >>但是按钮的MouseLeftButtonUpDoubleAnimationCompleted都无法触发,打了断点,根本就进不去,怎么办?

    PreviewMouseLeftButtonUp代替MouseLeftButtonUp试下,MouseLeftButtonUp没有fire的原因可能是如这里所说的:

    Looks like Button control is eating up that event Since Button.Click is actually a combination of LeftButtonDown event and LeftButtonUp event:

    http://stackoverflow.com/a/318304

    >> DoubleAnimationCompleted都无法触发

    你可以看看这个:

    http://stackoverflow.com/a/14183515

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    2015年3月20日 7:56