O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EbaySearchView Page

When the viewmodel is created within the view, it receives a Func that allows it to resolve the EbayClient (see Listing 27.7).

The view contains a TextBox to allow the user to enter a search query.

The view subscribes to the KeyUp event of the TextBox, which allows the app to detect when the user taps the Enter key on the Software Input Panel (SIP) and to execute the viewmodel object’s SearchCommand.

LISTING 27.7. EbaySearchView Class

public partial class EbaySearchView : PhoneApplicationPage{    public EbaySearchView()    {        InitializeComponent();        DataContext = new EbaySearchViewModel(            () => new EbayClient(), new NetworkConnectionMonitor());    }    EbaySearchViewModel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required