diff Messaging/Common/Controls/MessageTile.xaml @ 27:96fdf58e05b4

Server working with sockets and rabbitmq
author adminsh@apollo
date Wed, 21 Mar 2012 19:00:59 +0000
parents 045dac571339
children
line wrap: on
line diff
--- a/Messaging/Common/Controls/MessageTile.xaml	Wed Mar 21 15:39:53 2012 +0000
+++ b/Messaging/Common/Controls/MessageTile.xaml	Wed Mar 21 19:00:59 2012 +0000
@@ -3,9 +3,9 @@
              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"
-             DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}"
              mc:Ignorable="d">
 
     <Grid>
@@ -27,8 +27,8 @@
                Margin="10,10,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
-               Source="{Binding Path=DisplayIcon,
-                                Mode=OneWay,
+               Source="{Binding DisplayIcon,
+                                ElementName=CustomMessageTile,
                                 UpdateSourceTrigger=PropertyChanged}"
                Stretch="None" />
 
@@ -39,9 +39,10 @@
                    Margin="0,0,10,0"
                    HorizontalAlignment="Right"
                    FontSize="48"
-                   Text="{Binding Path=DisplayCount,
+                   Text="{Binding DisplayCount,
                                   StringFormat=N0,
                                   Mode=TwoWay,
+                                  ElementName=CustomMessageTile,
                                   UpdateSourceTrigger=PropertyChanged}" />
 
         <TextBlock Name="tbTitle"
@@ -53,8 +54,9 @@
                    HorizontalAlignment="Right"
                    VerticalAlignment="Bottom"
                    FontSize="24"
-                   Text="{Binding Path=DisplayText,
+                   Text="{Binding DisplayText,
                                   Mode=TwoWay,
+                                  ElementName=CustomMessageTile,
                                   UpdateSourceTrigger=PropertyChanged}"
                    TextWrapping="Wrap" />