<UserControl x:Class="SilverlightGridWithTwitter.Page"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:GridView="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
    xmlns:telerikGrid="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
    <Grid Margin="300,10,300,10">
        <Grid.Resources>
            <ControlTemplate x:Key="MyCustomRowTemplate" TargetType="GridView:GridViewRow">
                <Border BorderBrush="AliceBlue" BorderThickness="1">
                    <StackPanel Margin="10" VerticalAlignment="Center" Orientation="Horizontal" HorizontalAlignment="Left">
                        <Image Source="{Binding ImageUrl}" VerticalAlignment="Top" />
                        <StackPanel Orientation="Vertical" VerticalAlignment="Center" Margin="10,0,0,0">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                                <HyperlinkButton Content="{Binding Author.Name}" Foreground="Blue" TargetName="_blank" NavigateUri="{Binding Author.Url}" />
                                <TextBlock Text=":" />
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
                                    <TextBlock Margin="30,0,0,0" Text="{Binding Published}"/>
                                    <HyperlinkButton Margin="30,0,0,0" Content="View Tweet" Foreground="Blue" TargetName="_blank" NavigateUri="{Binding Url}" />
                                </StackPanel>
                            </StackPanel>
                            <TextBlock Width="500" Height="60" Text="{Binding Title}" TextWrapping="Wrap" />
                        </StackPanel>
                    </StackPanel>
                </Border>
            </ControlTemplate>
            <Style x:Key="rowStyle" TargetType="GridView:GridViewRow">
                <Setter Property="Template" Value="{StaticResource MyCustomRowTemplate}" />
            </Style>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <StackPanel Margin="5" Orientation="Horizontal">
            <HyperlinkButton TargetName="_blank" NavigateUri="http://search.twitter.com/">
                <Image Source="http://search.twitter.com/images/search/twitter-logo-small.png" VerticalAlignment="Center" />
            </HyperlinkButton>
            <TextBox x:Name="TextBox1" KeyDown="TextBox1_KeyDown" VerticalAlignment="Center" Width="300" Margin="10,10,0,0" />
            <Button Content="Search" Margin="10,0,0,0" Height="30" Width="100" VerticalAlignment="Bottom" />
        </StackPanel>
        <telerikGrid:RadGridView telerik:Theming.Theme="Vista" Grid.Row="1" x:Name="RadGridView1" AutoGenerateColumns="False" ShowGroupPanel="False" ScrollMode="RealTime" 
                             IsReadOnly="True" ShowColumnHeaders="False" Background="White"
                             VerticalGridlinesVisibility="Collapsed"
                             VerticalGridlinesBrush="Transparent" RowStyle="{StaticResource rowStyle}" 
                             UseAlternateRowStyle="False" />
        <StackPanel x:Name="Pager" Visibility="Collapsed" Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
            <Button x:Name="Newer" Visibility="Collapsed" Margin="3" Content="Newer" Click="Button_Click" VerticalAlignment="Center" />
            <TextBlock x:Name="PageInfo" Margin="3" VerticalAlignment="Center" />
            <Button x:Name="Older" Margin="3" Content="Older" Click="Button_Click" VerticalAlignment="Center" />
        </StackPanel>
    </Grid>
</UserControl>
