<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:WindowsPhone.Recipes.Push.Server.ViewModels"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
                    xmlns:behaviors="clr-namespace:WindowsPhone.Recipes.Push.Server.Behaviors"
                    mc:Ignorable="d">
	
    <DataTemplate DataType="{x:Type vm:CounterPushPatternViewModel}">
        <Border Style="{DynamicResource ViewBorderStyle}">
            <Grid d:LayoutOverrides="Width">
                
                <HeaderedContentControl Width="Auto" VerticalAlignment="Top">
                    <HeaderedContentControl.Header>
                        <TextBlock Text="Tile Message" FontWeight="Bold" />
                    </HeaderedContentControl.Header>
                    <Grid Height="Auto">
                        <StackPanel Margin="0,0,185,84">
                            <TextBlock Text="Title" Margin="4" />
                            <TextBox TextWrapping="Wrap" Margin="4" Text="{Binding Title, UpdateSourceTrigger=PropertyChanged}" />
                        </StackPanel>

                        <ListBox ItemsSource="{Binding TileImages}"
                                 SelectedItem="{Binding BackgroundImageUri}"
                                 Margin="0,0,0,-63"
                                 VerticalAlignment="Bottom"
                                 HorizontalAlignment="Right"
                                 Width="183"
                                 BorderThickness="0" Background="Transparent"
                                 ItemContainerStyle="{DynamicResource ImageListBoxItemStyle}">
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                            <ItemsControl.ItemTemplate>
                                <DataTemplate>
                                    <Image Source="{Binding}" Width="48" Height="48" Stretch="UniformToFill" />
                                </DataTemplate>
                            </ItemsControl.ItemTemplate>
                        </ListBox>

                        <Border BorderThickness="5" BorderBrush="#FFDEDEDE" Background="#FF333333" HorizontalAlignment="Right" VerticalAlignment="Center">
                            <Grid Width="173" Height="173">
                                <Image Source="{Binding BackgroundImageUri, Converter={StaticResource NullTileImageConverter}}" Stretch="UniformToFill" />
                                <TextBlock Height="22" TextWrapping="NoWrap" Text="{Binding Title}" VerticalAlignment="Bottom" Margin="6,0,6,6" FontSize="18.667" FontWeight="Bold" Width="158" HorizontalAlignment="Center"/>
                            </Grid>
                        </Border>

                    </Grid>
                </HeaderedContentControl>

                <Button Content="Send" Height="Auto" Command="{Binding SendCommand}" VerticalAlignment="Bottom" d:LayoutOverrides="GridBox" Width="64" RenderTransformOrigin="2.643,1.088" HorizontalAlignment="Right" Margin="0,0,0,2.68" />

            </Grid>
        </Border>
    </DataTemplate>

</ResourceDictionary>