Which code segment should you insert at line 03?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application contains a data source and a TextBox control named txtUnitPrice. The Text property of the txtUnitPrice control is bound to the data source by using two-way binding. You write the following code segment.
01 private void OverridePrice(decimal newPrice)
02 {
03
04 txtUnitPrice.Text = newPrice;
05 }
You need to ensure that after the OverridePrice method is called, changes to the data source do not propagate to txtUnitPrice.
Which code segment should you insert at line 03?
Which XAML code fragment should you use?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You need to display the title of the page in a TextBlock control that is placed at the top of a page.
Which XAML code fragment should you use?
Which XAML code fragment should you use?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You write the following code fragment.
<Page.Resources>
<TextBlock x:Key="copyright" Text="Copyright Wingtip Toys 2008"/>
</Page.Resources>
You need to ensure that the copyright message is displayed on the pages of the application.
Which XAML code fragment should you use?
Which XAML code fragment should you use?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application contains a class named Place that has the following attributes:
* CityName: a string value that represents the name of a city
* State: a string value that represents the name of a state
* The application also has a collection of Place objects named places.
You need to create a Collection View on the places collection that meets the following requirements:
* The view is grouped by the state name.
* The view is sorted by the city name.
Which XAML code fragment should you use?
Which code segment should you insert at line 09?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application contains a CheckBox control named checkBox1 and a TextBox control named t1. The application contains the following code segment.
public class CheckBoxToColorConverter : System.Windows.Data.IValueConverter
{
public object Convert(object valueIn, System.Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
bool isChecked = Convert.ToBoolean(valueIn) ;
switch (isChecked)
{
case true:
return "Green";
default:
break;
}
return "Red";
}
}
You write the following code fragment.
01 <Window.Resources>
02 <src:CheckBoxToColorConverterKey="checkBoxToColorConverter"/>
03 <Style x:Key="CheckBoxChecked">
04 <Setter Property="Control.Template" Value="checkBoxToColorConverter" >
05 </Setter>
06 </Style>
07 </Window.Resources>
08 <StackPanel>
09
10 <CheckBox Name="checkBox1">Check For Green</CheckBox>
11 </StackPanel>
You need to ensure that when checkBox1 is in the selected state, the background of t1 changes to red.
Which code segment should you insert at line 09?
Which XAML code fragment should you use?
You are creating a Windows Presentation Foundation application. You create the application by using Microsoft .NET Framework 3.5.
You create a window that has two tabs for the application. You associate the following XAML code fragment with the tab control that contains the two tabs.
<Window.Resources>
<c:PetSelection x:Key="myPetSelection" />
</Window.Resources>
You add a property named Index to the PetSelection class. You need to ensure that when the user clicks a tab, the SelectedIndex property value of the tab
control is transferred to the Index property of the myPetSelection object.
Which XAML code fragment should you use?
Which code segment should you use?
You are creating a Windows Presentation Foundation application to track inventory levels.
You use Microsoft .NET Framework 3.5 to create the application. You need to create a Product class to propagate changes from the InventoryLevel property to the InventoryLevel label control.
Which code segment should you use?
Which code segment should you insert at line 03?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
You create an XAML page named Inventory Management for the application.
You add a bound TextBox control named txtSetInventoryLevel to the page. The TextBox control is set to explicitly update the data source.
You add the following method to update the inventory level.
01 private void UpdateInventoryLevel(int quantity)
02 {
03 …
04 }
You need to ensure that the changes made in the txtSetInventoryLevel TextBox control are reflected in the data source.
Which code segment should you insert at line 03?
Which class definition should you use?
You are creating a Windows Presentation Foundation browser application by using Microsoft .NET Framework 3.5.
The application contains a PageFunction class named CustomerPage.
You need to ensure that the CustomerPage page function can perform the following tasks:
* Accept a customer ID in the form of a string.
* Allow the user to update customer information on the page.
* Return an instance of a Customer object with the updated information.
Which class definition should you use?
Which code segment should you use?
You are creating a Windows Presentation Foundation application by using Microsoft .NET Framework 3.5.
The application uses several asynchronous operations to calculate data that is displayed to the user. An operation named tommorowsWeather performs calculations that will be used by other operations. You need to ensure that tommorowsWeather runs at the highest possible priority. Which code segment should you use?