70-502 TS Braindump
ExamSoon 70-502 Exams
Microsoft TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation
O rder : 70-502 Exam
Practice Exam: 70-502
Exam Number/Code: 70-502
Exam Name: TS: Microsoft .NET Framework 3.5 - Windows Presentation
Foundation
Questions and Answers: 177 Q&As
Free 70-502 Braindumps
Exam : Microsoft 70-502
Title : TS: Microsoft .NET Framework 3.5 - Windows Presentation Foundation
1. You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.
The application defines a BrowserWindow class. Each instance of the BrowserWindow class allows the user to
browse a Web site in a separate window. When a new browser window is opened, the user is redirected to a
predefined URL.
You write the following code segment.
01 private void OpenNewWindow(object sender, RoutedEventArgs e)
02 {
03 Thread newWindowThread = new Thread(new
ThreadStart(NewThreadProc));
04
05 newWindowThread.Start();
06 }
07 private void NewThreadProc()
08 {
09 10 ?}
You need to ensure that the following requirements are met:
?The main window of the application is not blocked when an additional browser window is created.
?The application completes execution when the main window of the application is closed.
What should you do?
A. Insert the following code segment at line 04.
newWindowThread.SetApartmentState(ApartmentState.STA);
newWindowThread.IsBackground = true;
Insert the following code segment at line 09.
BrowserWindow newWindow = new BrowserWindow();
newWindow.Show();
Application app = new Application();
app.Run(newWindow);
B. Insert the following code segment at line 04.
newWindowThread.IsBackground = true;
Insert the following code segment at line 09.
newWindowThread.SetApartmentState(ApartmentState.STA);
BrowserWindow newWindow = new BrowserWindow();
newWindow.Show();
Application app = new Application();
app.Run(newWindow);
C. Insert the following code segment at line 04.
newWindowThread.SetApartmentState(ApartmentState.STA);
newWindowThread.IsBackgr