Fixed the sample app behavior.
Add documents about event handling with UI.