Click here to Skip to main content
15,891,427 members
Articles / Mobile Apps

Netflix Browser for Windows Phone 7 - Part 1

Rate me:
Please Sign up or sign in to vote.
4.95/5 (58 votes)
17 Mar 2011CPOL15 min read 219.3K   1.1K   92  
Learn how to use the Pivot and Panorama controls, page navigation, OData and more!
<phone:PhoneApplicationPage 
    x:Class="NetflixBrowser.DvdDetails"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:converter="clr-namespace:NetflixBrowser.Converters" mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <UserControl.Resources>
        <converter:StringFormatConverter x:Key="StringFormatConverter" />
    </UserControl.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <StackPanel Orientation="Horizontal" Margin="0,0,10,20">
            <Image  CacheMode="BitmapCache" Source="{Binding BoxArt.LargeUrl}" Width="100" Margin="12,20,9,0" VerticalAlignment="Top"/>
            <StackPanel Width="311">
                <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Margin="12,0,12,0" Style="{StaticResource PhoneTextLargeStyle}"/>
                <TextBlock Text="{Binding ShortSynopsis}" TextWrapping="Wrap" Margin="12,5,12,10" Style="{StaticResource PhoneTextSubtleStyle}"/>
                <StackPanel Orientation="Horizontal" >
                    <TextBlock  Margin="12,5,12,5" Text="Average Rating:" Style="{StaticResource PhoneTextNormalStyle}"/>
                    <TextBlock  Margin="0,5,12,5" Text="{Binding AverageRating}" Style="{StaticResource PhoneTextNormalStyle}"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock  Margin="12,5,12,5" Text="Available: " Style="{StaticResource PhoneTextNormalStyle}"/>
                    <TextBlock Margin="0,5,12,5" Text="{Binding Dvd.AvailableFrom, 
                        Converter={StaticResource StringFormatConverter}, ConverterParameter=\{0:d MMMM yyyy\}}" 
                        TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock  Margin="12,5,12,5" Text="Language: " Style="{StaticResource PhoneTextNormalStyle}"/>
                    <TextBlock Margin="0,5,12,5" Text="{Binding Languages[0].Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}"/>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBlock  Margin="12,5,12,5" Text="Genre: " Style="{StaticResource PhoneTextNormalStyle}"/>
                    <TextBlock Margin="0,5,12,5" Text="{Binding Genres[0].Name}" TextWrapping="Wrap" Style="{StaticResource PhoneTextNormalStyle}"/>
                </StackPanel>
            </StackPanel>
        </StackPanel>
    </Grid>
<!---->
    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Product Manager Outcoder
United States United States
Katka has several years of experience working in software development in the areas of market research and e-commerce. She has wide ranging experience in developing Java, ASP.Net MVC, ASP.Net, WPF, Silverlight, and Windows Phone applications.

Company: Outcoder.com
Group: XAML Experts
Proud co-creator of: Surfy browser, Airlock Browser

Comments and Discussions