nerdexam
Microsoft

70-511 · Question #61

70-511 Question #61: Real Exam Question with Answer & Explanation

Sign in or unlock 70-511 to reveal the answer and full explanation for question #61. The question stem and answer options stay visible for context.

Question

You are developing a Windows Presentation Foundation (WPF) application. The application contains the following code in the code-behind file for an application window. (Line numbers are included for reference only.) 01 StackPanel stack = new StackPanel () ; 02 Content = stack; 03 for (int i=0; i<10; i++) 04 { 05 Button btn = new Buttonf(); 06 btn.Name = ((char) ('A' + i)) .ToString (); 07 btn.Content = btn.Name + "says 'Click me' "; 08 09 } You need to ensure that all of the Button controls that are defined in this code segment appear in the application window. Which code segment should you insert at line 08?

Options

  • Astack.Children.Add(btn);
  • Bstack.Children.Insert (i + 1, btn);
  • CContent = btn;
  • DContent = new Button() { Name = {'A' + i) . ToString()

Unlock 70-511 to see the answer

You've previewed enough free 70-511 questions. Unlock 70-511 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-511 Practice