Added an event for CustomDialog (IsOpenChanged)