What should you do?

You are developing a Windows Presentation Foundation (WPF) application.

An event triggers a workflow such that a parent control executes the event handlers before the child controls.

You need to ensure that if a parent controls event handler encounters an error, the subsequent handlers are not called.

What should you do?

You are developing a Windows Presentation Foundation (WPF) application.

An event triggers a workflow such that a parent control executes the event handlers before the child controls.

You need to ensure that if a parent controls event handler encounters an error, the subsequent handlers are not called.

What should you do?

A.
Use handlers for a tunneling routed event and mark the event as handled in the case of a problem.

B.
Use handlers for a tunneling routed event and make the event as handled in the finally portion of a try-catch-finally code block.

C.
Use handlers for a bubbling routed event and mark the event as handled in the case of a problem.

D.
Use handlers for a bubbling routed event and set the Handled property of the RoutedEventArgs object to true in the catch portion of a try-catch-finally code block.



Leave a Reply 0

Your email address will not be published. Required fields are marked *