PrepAway - Latest Free Exam Questions & Answers

Which three code segments should you insert in sequence at line 03?

DRAG DROP
You are developing a Windows Store app.
The following code segment defines an event procedure. (Line numbers are included for
reference only.)

You need to define a custom help setting in the event procedure.
Which three code segments should you insert in sequence at line 03? (To answer, move the
appropriate code segments to the answer area and arrange them in the correct order.)

PrepAway - Latest Free Exam Questions & Answers

Answer: See the explanation.

Explanation:

Box 1:

Box 2:

Box 3:

Note:
Example:

void onCommandsRequested(
SettingsPane settingsPane,
SettingsPaneCommandsRequestedEventArgs eventArgs)
{
UICommandInvokedHandler handler = new
UICommandInvokedHandler(onSettingsCommand);
SettingsCommand generalCommand = new SettingsCommand(
"generalSettings", "General", handler);
eventArgs.Request.ApplicationCommands.Add(generalCommand);
SettingsCommand helpCommand = new SettingsCommand("helpPage", "Help", handler);
eventArgs.Request.ApplicationCommands.Add(helpCommand);
}

2 Comments on “Which three code segments should you insert in sequence at line 03?

  1. Jarek says:

    I believe UICommandInvokedHandler do not have no-arguments constructor, so you should change first block to:
    UICommandInvokedHandler settingHandler = new UICommandInvokedHandler(OnSettingsClicked);




    0



    0

Leave a Reply