Answer the following statements true (T) or false (F)

1. A MouseEventArgs object’s GetPosition event always returns a position relative to the top left of the WPF window.
2. A routed event is ignored after its Handled property is set to True.
3. A bubbling event travels down the container hierarchy, and a tunneling event travels up the container hierarchy.
4. The CanExecute event for a command allows you to implement logic that determines whether a command should be enabled or disabled.
5. WPF styles require you to explicitly set the individual properties of each control.

1. False. The position is relative to the top left of the control which raises the event.
2. True.
3. False. The opposite is true -- a bubbling event travels up the hierarchy, and a tunneling event travels down the hierarchy
4. True.
5. False. Styles allow you to apply one style definition to several controls, even controls of different types.

Computer Science & Information Technology

You might also like to view...

Document properties are displayed on the ________ page of the Backstage view

A) Print B) Info C) Share D) Help

Computer Science & Information Technology

Suppose the input for number is 9. What is the output from running the following program?

``` #include using namespace std; int main() { cout << "Enter an integer: "; int number; cin >> number; int i; bool isPrime = true; for (i = 2; i < number && isPrime; i++) { if (number % i == 0) { isPrime = false; } } cout << "i is " << i << endl; if (isPrime) cout << number << " is prime" << endl; else cout << number << " is not prime" << endl; return 0; } ``` A. i is 3 followed by 9 is not prime B. i is 3 followed by 9 is prime C. i is 4 followed by 9 is prime D. i is 4 followed by 9 is not prime

Computer Science & Information Technology