DRAG DROP
You are developing a Windows Store app that prints documents.
You need to ensure that the app enables the user to specify the paper size.
Which four actions should you perform in sequence? (To answer, move the appropriate actions from
the list of actions to the answer area and arrange them in the correct order.)
Answer: See the explanation.
FALSE !
private void PrintManager_PrintTaskRequested(PrintManager sender,
PrintTaskRequestedEventArgs args)
{
PrintTask printTask = null;
printTask = args.Request.CreatePrintTask(
“Windows 8 Print Sample”, (sourceRequested) =>
{
printTask.Completed += OnPrintTaskCompleted;
PrintTaskOptionDetails detailedOptions =
PrintTaskOptionDetails.GetFromPrintTaskOptions(printTask.Options);
IList displayedOptions = detailedOptions.DisplayedOptions;
displayedOptions.Clear();
displayedOptions.Add(StandardPrintTaskOptions.Orientation);
displayedOptions.Add(StandardPrintTaskOptions.ColorMode);
displayedOptions.Add(StandardPrintTaskOptions.MediaSize);
{
PrintManager.GetForCurrentView().PrintTaskRequested += OnPrintTaskRequested;
m_printDocument = new PrintDocument();
m_printDocumentSource = m_printDocument.DocumentSource;
}
void OnPrintTaskRequested(PrintManager sender, PrintTaskRequestedEventArgs args)
{
PrintTask printTask = args.Request.CreatePrintTask(“Print Example”, SourceRequestedHandler);
}
4, 3, 5
no.. 431
After you obtain a reference to the detailed options for the current print task by invoking the GetFromPrintTaskOptions static method, you have to get a reference to the
DisplayedOptions property, clear the collection, and add the options you want to display in the preview window one by one (and in the right order).
2431 =)