view Messaging/Common/Controls/MessageTile.xaml @ 31:7d9de5746f18

Working version
author adminsh@apollo
date Thu, 22 Mar 2012 08:09:41 +0000
parents 96fdf58e05b4
children
line wrap: on
line source

<UserControl x:Class="Common.Controls.MessageTile"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             Name="CustomMessageTile"
             Width="200"
             Height="200"
             mc:Ignorable="d">

    <Grid>

        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="60" />
            <RowDefinition Height="75" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Image Name="imageIcon"
               Grid.Row="0"
               Grid.Column="0"
               Margin="10,10,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               Source="{Binding DisplayIcon,
                                ElementName=CustomMessageTile,
                                UpdateSourceTrigger=PropertyChanged}"
               Stretch="None" />

        <TextBlock Name="tbCount"
                   Grid.Row="1"
                   Grid.Column="0"
                   Grid.ColumnSpan="2"
                   Margin="0,0,10,0"
                   HorizontalAlignment="Right"
                   FontSize="48"
                   Text="{Binding DisplayCount,
                                  StringFormat=N0,
                                  Mode=TwoWay,
                                  ElementName=CustomMessageTile,
                                  UpdateSourceTrigger=PropertyChanged}" />

        <TextBlock Name="tbTitle"
                   Grid.Row="2"
                   Grid.RowSpan="2"
                   Grid.Column="0"
                   Grid.ColumnSpan="3"
                   Margin="10"
                   HorizontalAlignment="Right"
                   VerticalAlignment="Bottom"
                   FontSize="24"
                   Text="{Binding DisplayText,
                                  Mode=TwoWay,
                                  ElementName=CustomMessageTile,
                                  UpdateSourceTrigger=PropertyChanged}"
                   TextWrapping="Wrap" />

    </Grid>
</UserControl>