Microsoft TS: Windows Applications Development with Microsoft .NET Framework 4 Sample Questions:
1. You are developing a Windows Presentation Foundation (WPF) application.
The application has an Image control.
You need to ensure that a portion of the image displays in a circle in the control.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A) Add an Ellipse element to the control. Use Ellipse.Stroke and ImageBrush with the image as ImageSource.
B) Add an Image.Clip element to the control. Use LineGeometry within Image.Clip.
C) Add an Ellipse element to the control. Use Ellipse.Fill and ImageBrush with the image as ImageSource.
D) Add an Image.Clip element to the control. Use EllipseGeometry within Image.Clip.
2. You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a
Windows Presentation Foundation (WPF) application.
You suspect that the data returned from the database is incorrect.
You need to capture interactions to the database by using IntelliTrace.
Which event type should you capture?
A) ADO.NET
B) DataBinding
C) Tracing
D) ServiceModel
3. You are developing a Windows Presentation Foundation (WPF) application that contains a custom Button control.
The custom Button control can be set as active by setting an IsActive property to true. You need to ensure that the IsActive property can be bound to a business object.
What should you do on the custom Button control?
A) Implement IsActive as a Dependency property.
B) Implement IsActive as a Microsoft .NET property.
C) Implement INotifyPropertyChanged
D) Implement IQueryable.
4. You are developing a Windows Presentation Foundation (WPF) application. You have the following style defined in the app.xaml file.
<Style x:Key="btnItalic" x:Naitie= "styleItalic"
TargetType="{x:Type Button}">
<Setter Property="FontStyle" Value="Italic"/></Style>
You need to apply this style to a button named button1 in the application at run time.
Which code segment should you use?
A) button1.Style = this.FindName("btnltalic") as Style;
B) button1.Style = this.FindName("styleltalic") as Style;
C) button1.Style = this.FindResoucce("btnltalic") as Style;
D) button1.Style = this.FindResource("styleltalic") as Style;
5. You use Microsoft .NET Framework 4 to create a Windows Presentation Framework (WPF) application.
You plan to create a custom control that contains four text input fields. Each of the text input fields within the control will contain a label.
You need to ensure that the text input fields within the control can be validated by using a regular expression validator.
Which class should you inherit from?
A) TextBox
B) UIElement
C) TextElement
D) UserControl
Solutions:
| Question # 1 Answer: C,D | Question # 2 Answer: C | Question # 3 Answer: A | Question # 4 Answer: C | Question # 5 Answer: D |
We're so confident of our products that we provide no hassle product exchange.


By Walker

