Update PanedBackend.cs

Fixed to use EnableEvent and DisableEvent, and to use  ApplicationContext.InvokeUserCode within the Handler.