Best Microsoft MCTS Certification, Microsoft MCITP Training at certkingdom.com
QUESTION 1
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
You have recenty created an application, and cofigured it to have a composite user control. You
also configured the user control to have a TextBox control, named txtEntry. You then configure the
user control to be stored in a window, and include the following code in the constructor of the user control:
AddHandler(TextBox.TextChangedEvent, new RoutedEventHandler(Audit_TextChanged), true);
Which of the following statements are TRUE? (Choose all that apply.)
A. A text-changed event handler, named Audit_TextChanged, was created for the txtEntry control.
B. Audit_TextChanged will stop running because the event is marked as handled by certain event handlers
C. Even though the event is marked as handled by certain event handlers, Audit_TextChanged will still run.
D. Audit_TextChanged will continue to run until the event is marked as handled.
Answer: A,C
Explanation:
QUESTION 2
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
After developing an application, named CertkingdomApp22, you configure a Button control and a
MenuItem control that will be hosted by a window. The Button control and the MenuItem control
have both been named Add.
You have configured the exact same RoutedCommand, named AddCommand, as the Command
properties of these two controls. You then write the code shown below:
Private void CanAdd (object sender, CanExecuteRoutedEventArgs e) { ... }
You are then informed that the two controls should be disabled when the CanExecute property is
set to to false.
Which combination of the following actions should you take? (Choose all that apply.)
A. You should consider having an event handler configured for the CanExecuteChanged event of
the AddCommand command.
B. You should consider having a CommandBinding object added to the CommandBindings
property of the window.
C. You should consider having a CommandBinding object added to the CommandBinding section
of the MenuItem control.
D. You should consider having the CanAdd method called from within the event handler.
E. You should consider having the AddCommand inherited from the RoutedUICommand class.
F. You should consider having the Command property of CommandBinding set to the AddCommand command.
G. You should consider having the CanAdd method called from within the constructor of the AddCommand command.
H. You should consider having the CanExecute property of the CommandBinding object set to the CanAdd method.
Answer: B,F,H
Explanation:
QUESTION 3
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
You have created a new application, and written the code shown below:
MediaPlayer player = new MediaPlayer();
player.Open(new URI(AudioFilePath), UriKind.Relative)); player.play();
You then inserted this code into the button onclick event.
Which of the following statements are TRUE with regards to the configuration?
A. The media player will open as soon as a user clicks the button, but no file will be played.
B. The file that is stored in the AudioFilePath variable will be played as soon as the button is clicked by the user.
C. All files stored in the media player will be played in sequence.
D. All files stored in the media player will be played randomly.
Explanation:
QUESTION 4
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Forms applications. After developing a new application, named
CertkingdomApp13, you include a custom class named CertkingdomClient.
You have configured a new object data source, and also added a BindingSource component
named CertkingdomclientBindingSource to a Windows Form. The CertkingdomclientBindingSource component is
configured to be data-bound to the CertkingdomClient data source.
You then configure the Windows form to have two TextBox controls for presenting and modifying
CertkingdomClient. You have bound the data of these controls to its own CertkingdomclientBindingSource
property. The Windows form is also configured to contain an ErrorProvider component, named
errorProvider. The data entries for the TextBox controls will be validated by the ErrorProvider
component.
You want to configure the validation process to occur automatically.
Which of the following actions should you take?
A. You should consider throwing an exception when the value is invalid to apply the validation
rules inside the TextChanged event handler of each TextBox control by throwing an exception
when the value is invalid. You should also consider inserting the code shown below in the
InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.CertkingdomclientBindingSource;
B. You should consider throwing an exception when the value is invalid to apply the validation
rules inside the TextChanged event handler of each TextBox control by throwing an exception
when the value is invalid. You should also consider inserting the code shown below in the
InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.CertkingdomclientBindingSource.DataSource;
this.errorProvider.DataMember = this.CertkingdomclientBindingSource.DataMember;
C. You should consider throwing an exception when the value is invalid to apply the validation
rules inside the setter of each property of the CertkingdomClient class. You should also consider inserting
the code shown below in the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.CertkingdomclientBindingSource.DataSource;
this.errorProvider.DataMember = this.CertkingdomclientBindingSource.DataMember;
D. You should consider throwing an exception when the value is invalid to apply the validation
rules inside the setter of each property of the CertkingdomClient class. You should also consider inserting
the code shown below in the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.CertkingdomclientBindingSource;
Answer: D
Explanation:
QUESTION 5
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Forms applications.
You have recently created a new application. You then wrote the code shown below:
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture;
Which of the following options are TRUE with regards to the code?
A. The user interface will make use of the culture settings that are configured in the Control Panel at present.
B. The user interface will make use of new culture settings.
C. The user interface will have no culture settings.
D. The user interface will make use of the culture settings that were installed with the operating
system.
Answer: A
Explanation:
QUESTION 6
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
You are in the process of developing a new application, named CertkingdomApp35, which has a server
assembly, as well as a partially trusted client assembly configured. After configuring customized
sandboxed application domain, you are required to make sure that you are able to run CertkingdomApp35
in a partial-trust setting.
Which of the following actions should you take?
A. You should consider configuring the PartialTrustVisibilityLevel setting for the
AllowPartiallyTrustedCallers attribute of the server assembly to be VisibleByVefault.
B. You should consider configuring the PartialTrustVisibilityLevel setting for the
AllowPartiallyTrustedCallers attribute of the server assembly to be NotVisibleByDefault.
C. You should consider configuring the PartialTrustVisibilityLevel setting for the
AllowPartiallyTrustedCallers attribute of the client assembly to be VisibleByDefault.
D. You should consider configuring the PartialTrustVisibilityLevel setting for the
AllowPartiallyTrustedCallers attribute of the client assembly to be NotVisibleByDefault.
Answer: B
Explanation:
QUESTION 7
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Forms applications.
After creating a new client application, you configure a default form size in the UserScopedSetting
of the the ApplicationSettingsBase class.
Then application makes use of the Form1 type form, which includes a FormSettings object named
frmSettings1.
You have been instructed to write code that allows for the user’s preferred form size to be used
whenever the user opens the application.
Which of the following options should you write?
A. public void Form2_Load(object sender, EventArgs e) { frmSettings2.start();
} public void Form2_FormClosing(object sender, FormClosingEventArgs e) {
frmSettings2.FormSize = this.Size;
frmSettings2.Save(); }
B. private void Form1_Load(object sender, EventArgs e) { frmSettings1.UCertkingdomrade();
} private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{ Form1.FormSize = this.Size;
Form1.Delete(); }
C. private normal Form1_Load(object sender, EventArgs e) { this.Size = frmSettings2.FormSize;
} public void Form2_FormClosing(object sender, FormClosingEventArgs e)
{ Form2.FormSize = this.Size;
Form2.UCertkingdomrade(); }
D. private void Form1_Load(object sender, EventArgs e) { this.Size = frmSettings1.FormSize;
} private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{ frmSettings1.FormSize = this.Size;
frmSettings1.Save(); }
Answer: D
Explanation:
QUESTION 8
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Forms applications.
You have been instructed to create a new application. The application must present a text
message requesting users to update their settings. This should occur whenever a user starts the
application.
Which of the following options suitably represents the required code?
A. sealed class FormSettings : ApplicationSettingsBase
{
[UserScopedSetting()] [DefaultSettingValue("Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
B. sealed class FormSettings : ApplicationSettingsBase
{
ApplicationScopedSetting()] [DefaultSettingValue("Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
C. sealed class FormSettings : ApplicationSettingsBase
{
[MachineSetting()] [SettingsDescription("Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
D. sealed class FormSettings : ApplicationSettingsBase
{
[UserScopedSetting()] [SettingsDescription("Description: Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
E. sealed class FormSettings : ApplicationSettingsBase
{
[ApplicationScopedSetting()] [SettingsDescription("Description: Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
F. sealed class FormSettings : ApplicationSettingsBase
{
[MachineSetting()] [SettingsDescription("Description: Please update your settings.")]
public String Description
{
get { return (String)this["Description"]; }
set { this["Description"] = value;}
}
}
Answer: A
Explanation:
QUESTION 9
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
You are in the process of developing a new application named CertkingdomApp13. CertkingdomApp13 must be
able to present data to application users two consecutive pages at one time.
Which of the following actions should you take?
A. You should consider having an XMLDocumentReader control configured.
B. You should consider having a FlowDocumentReader control configured.
C. You should consider making use of the Microsoft Word Viewer.
D. You should consider making use of the XPS Reader.
Answer: B
Explanation:
QUESTION 10
You are employed as an application developer at Certkingdom.com. You make use of Microsoft .NET
Framework 4 to develop Windows Presentation Foundation (WPF) applications.
You are in the process of developing a new application named CertkingdomApp35. You have been
informed that CertkingdomApp35 should have a layout panel configured. The layout panel used should
allow for child objects to be organized and displayed vertically.
The layout panel should not, however, require the child objects to be resized.
Which of the following actions should you take?
A. You should consider making use of the Grid panel layout.
B. You should consider making use of the Canvas panel layout.
C. You should consider making use of the Lock layout.
D. You should consider making use of a Stack panel layout.
Answer: D
Explanation:
Best Microsoft MCTS Certification, Microsoft MCITP Training at certkingdom.com
No comments:
Post a Comment