PrepAway - Latest Free Exam Questions & Answers

Category: 70-502

Exam 70-502: TS: Microsoft .NET Framework 3.5, Windows Presentation Foundation Application Development

What should you do to ensure that the users can use the application?

You create a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You perform the following two tasks:
* Use a digital certificate that is generated by an internal certificate authority (CA) to sign the application.
* Store the application files on a central Web site.
You instruct the users to access the Web site and start the application by using the ClickOnce technology. The users report that their attempts to start the application fail.
You need to ensure that the users can use the application.
What should you do?

What should you do to ensure that the following requirements are met?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following XAML code fragment.
(Line numbers are included for reference only.)

01 <DockPanel>
02 <DockPanel.Resources>
03 <Style TargetType="Button">
04 <Style.Triggers>
05
06 </Style.Triggers>
07 </Style>
08 </DockPanel.Resources>
09 <Button Content="Cut">
10 <Button.Triggers>
11
12 </Button.Triggers>
13 </Button>
14 </DockPanel>

You need to ensure that the following requirements are met:
* When the mouse is over the button, the foreground of the button turns yellow.
* When the button is pressed, the foreground of the button turns green.
What should you do?

What should you do to ensure that the content text of each button is displayed?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application contains the following elements:
* A button that has the text content "OK"
* A button that has the text content "Apply"
* A button that has the text content "Cancel"
* A custom control template that updates the appearance of Button controls
When you apply the custom control template to the three buttons, the buttons appear identical and their content text is not displayed.
You need to ensure that the content text of each button is displayed. What should you do?

What should you do to provide feedback to the user as early as possible?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application includes the following features:
* A data provider control.
* Twenty TextBox controls bound to the data provider.
* A Submit button that saves the TextBox values to a data source.
Business rules state that the value entered in the UserName TextBox control cannot be the same as any other UserName values in the data source.
You need to provide feedback to the user as early as possible when a duplicate value is entered in the UserName TextBox control.
What should you do?

What should you do to ensure that the assembly functions without propagating errors in both standalone?

You create an assembly by using Microsoft .NET Framework 3.5.
The assembly creates a new text file in the root of the C: drive. The assembly will be used in a Windows Presentation Foundation standalone application. The assembly will also be used in a Windows Presentation Foundation XAML Browser Application (XBAP).
The assembly contains the following code segment.
(Line numbers are included for reference only.)

01 public void Save()
02 {
03
04 FileStream stream = File.Create("c:newfile.txt");
05 try
06 {
07 StreamWriter writer = new StreamWriter(stream);
08 try
09 {
10 writer.WriteLine("Bew line in text file");
11 }
12 finally
13 {
14 writer.Dispose();
15 }
16 }
17 finally
18 {
19 stream.Dispose();
20 }
21
22 }

You need to ensure that the assembly functions without propagating errors in both standalone and XBAP applications.
What should you do?

What should you do to control the position of the slider thumb by clicking the buttons on the window?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You add a Slider control and two buttons to a window of the application. You write the following code fragment.
(Line numbers are included for reference only.)

01 <StackPanel Orientation="Horizontal">
02 <RepeatButton
03
04 Content="Left"/>
05 <Slider Name="slider"/>
06 <RepeatButton
07
08 Content="Right"/>
09 </StackPanel>

You need to control the position of the slider thumb by clicking the buttons on the window.
What should you do?

What should you do to customize the appearance of all Button controls in the user control …?

You are creating a Windows Presentation Foundation user control by using Microsoft .NET Framework 3.5.
You need to customize the appearance of all Button controls in the user control such that the following requirements are met:
* Each Button control has a purple background and white text.
* Each Button control is rotated 45 degrees.
* No other Button properties are customized or redefined.
* The customizations are defined in a single location.
What should you do?

What should you do to ensure that the animation terminates when a user clicks the rectangle?

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create a window by using the following XAML code fragment.
(Line numbers are included for reference only.)

01 <Rectangle x:Name="rect">
02 <Rectangle.Fill>
03 <SolidColorBrush x:Name="brush"/>
04 </Rectangle.Fill>
05 <Rectangle.Triggers>
06 <EventTrigger RoutedEvent="Rectangle.Loaded">
07 <BeginStoryboard x:Name="beginName">
08 <Storyboard x:Name="boardName">
09
10 </Storyboard>
11 </BeginStoryboard>
12 </EventTrigger>
13 <EventTrigger RoutedEvent="Rectangle.MouseLeftButtonDown">
14
15 </EventTrigger>
16 </Rectangle.Triggers>
17 </Rectangle>

You need to ensure that the animation starts when the rectangle is loaded. You also need to ensure that the animation terminates when a user clicks the rectangle.
What should you do?

What should you do to ensure that the check box displays the text “Is Active No” in the cleared st

You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You plan to add a check box to a window of the application. The check box must display the associated content and the text "Yes" or "No" instead of the check mark. You write the following XAML code fragment. (Line numbers are included for reference only.)

01 <Window.Resources>
02 <ControlTemplate x:Key="check" TargetType="CheckBox">
03 <DockPanel Name="dock">
04
05 <TextBlock Name="text"/>
06 </DockPanel>
07 <ControlTemplate.Triggers>
08 <Trigger Property="IsChecked" Value="False">
09
10 </Trigger>
11 </ControlTemplate.Triggers>
12 </ControlTemplate>
13 </Window.Resources>
14 <CheckBox Content="Is Active" Template="{StaticResource check}" />

You need to ensure that the check box displays the text "Is Active No" in the cleared state.
What should you do?


Page 1 of 912345...Last »