###BeginCaseStudy###
Case Study: 3
Scenario 3
Background
You are developing a Windows Store news aggregator app that will retrieve data from RSS
feeds and social networks based on the user’s subscriptions.
Application Structure
The app will run locally on the user’s device. User preferences will be available locally.
When a user starts the app, the app will load the RSS feed and social network information.
The app will retrieve data from RSS feeds by using the FeedRetriever class. The app will
authenticate to and retrieve data from social networks by using the SocialRetriever class.
By default, data is presented in a ListView control.
Relevant portions of the app files are shown. (Line numbers are included for reference only
and include a two-character prefix that denotes the specific file to which they belong.)
Technical Background
The design team has provided a custom XAML code segment for the itemTemplate attribute
of the GridView control that displays RSS feeds. The custom item template is named
newTem plate. It will not be used in other GridView controls.
Business Requirements
The app must enable users to perform the following tasks:
• Define a feed title.
• Define a list of RSS feeds that the users want to subscribe to.
• View information about topics that are popular on the users’ selected social networks.
• Share content that is aggregated by the app.
• Search aggregated content by using only the Search charm.
• Share RSS feed content by using the Share charm.
• Display general help information by using the Settings charm.
The app must list the name of each social network to which the user subscribes. The app must
indicate whether the user is authenticated to that social networking site.
The available data sources will be expanded to include JSON data from a third-party social
networking site that is hosted by Litware, Inc. An SSL connection to the Litware social
network is available.
Technical Requirements
The app has the following technical requirements:
• Retrieve user data from the social network services by using the authentication credentials.
• When making an HTTP request for content, read all content prior to acting on the response.
• When SSL is available, use SSL to retrieve data from social network providers.
The code that is used to retrieve data from RSS feeds must be reusable.
The app must display the information about the user’s social network subscriptions in a layout
control. The app must display authentication screens from the social networking sites when
an authentication screen is available.
The custom XAML code that was provided by the design team must be available for all
ListView controls in the app.
Data from the FeedRetriever class must be presented in a data control.
Two developers will create the SocialRetriever class, with the following assignments:
• Developerl must update methods for getting data.
• Developed must implement three new methods for exposing data to the user interface.
All methods must be self-contained and must not affect other methods in the SocialRetriever
class.
Multiple developers must not work in the same file at the same time.
###EndCaseStudy###
You need to implement the custom code for the RSS feed Gridview control.
What should you do?
A.
Clear the ItemTemplate attribute. Add the custom XAML to the Gridview control as an
inline Data Template element.
B.
Clear the ContentPresenterTemplate attribute. Add the custom XAML to the
ContentPresenterTemplate attribute as a string.
C.
Add a DataTemplate attribute to the Gridview control. Assign the custom XAML as the
value of the DataTemplate attribute.
D.
Add the custom XAML to the Gridview control as an inline DataContext element.
Explanation:
The design team has provided a custom XAML code segment for the itemTemplate attribute
of the GridView control that displays RSS feeds. The custom item template is named
newTem plate. It will not be used in other GridView controls.