i advice you using binding to your modal panel
and for example make a boutton and in the action of your boutton make a code like that
and suppose if you have a boutton in your modal panel to hide it here is the action for that boutton
Thanks for the reply. I implemented binding for modal panel. It worked fine.