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.)

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.)

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);
}



Leave a Reply 2

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


Jarek

Jarek

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

j

j

yes,
UICommandInvokedHandler handler = new UICommandInvokedHandler(onSettingsClicked);