changeset 35:83c1f62d9370

All working except image so far
author adminsh@apollo
date Tue, 27 Mar 2012 16:15:45 +0100
parents 874e51b94623
children c8c79f05d76f
files Messaging/Common/Common.csproj Messaging/Common/Controls/MessageTile.xaml Messaging/Common/Controls/MessageTile.xaml.cs Messaging/Common/Controls/MetroTile.cs Messaging/Common/Themes/Generic.xaml Messaging/Common/Themes/MetroColours.xaml Messaging/Server/App.xaml Messaging/Server/Server.csproj Messaging/Server/UI/MainWindow.xaml
diffstat 9 files changed, 302 insertions(+), 198 deletions(-) [+]
line wrap: on
line diff
--- a/Messaging/Common/Common.csproj	Thu Mar 22 08:42:03 2012 +0000
+++ b/Messaging/Common/Common.csproj	Tue Mar 27 16:15:45 2012 +0100
@@ -12,6 +12,8 @@
     <AssemblyName>Common</AssemblyName>
     <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <Utf8Output>true</Utf8Output>
+    <ExpressionBlendVersion>4.0.20525.0</ExpressionBlendVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>
@@ -31,6 +33,9 @@
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
   <ItemGroup>
+    <Reference Include="Elysium.Theme">
+      <HintPath>..\Libs\Elysium.Theme.1.3\Elysium.Theme.dll</HintPath>
+    </Reference>
     <Reference Include="GalaSoft.MvvmLight.WPF4, Version=0.0.0.0, Culture=neutral, PublicKeyToken=63eb5c012e0b3c1c, processorArchitecture=MSIL">
       <HintPath>..\Libs\MvvmLight.4.0\GalaSoft.MvvmLight.WPF4.dll</HintPath>
     </Reference>
@@ -38,29 +43,35 @@
     <Reference Include="PresentationFramework" />
     <Reference Include="System" />
     <Reference Include="System.Core" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xaml" />
+    <Reference Include="System.Xml" />
     <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Controls\MetroTile.cs" />
     <Compile Include="Messages\ClientMessages.cs" />
     <Compile Include="Messages\OverrideSwitchMessage.cs" />
     <Compile Include="Xaml\BindingErrorTraceListener.cs" />
     <Compile Include="Messages\LogMessages.cs" />
-    <Compile Include="Controls\MessageTile.xaml.cs">
-      <DependentUpon>MessageTile.xaml</DependentUpon>
-    </Compile>
     <Compile Include="Settings.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Xaml\XamlHelper.cs" />
   </ItemGroup>
   <ItemGroup>
-    <Page Include="Controls\MessageTile.xaml">
+    <Page Include="Themes\Generic.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
+    <Page Include="Themes\MetroColours.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
   </ItemGroup>
   <ItemGroup>
-    <Resource Include="Icons\Mail.png" />
+    <Resource Include="Icons\mail.png" />
   </ItemGroup>
   <ItemGroup>
     <Resource Include="Icons\add.png" />
--- a/Messaging/Common/Controls/MessageTile.xaml	Thu Mar 22 08:42:03 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-<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>
--- a/Messaging/Common/Controls/MessageTile.xaml.cs	Thu Mar 22 08:42:03 2012 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-using System.ComponentModel;
-using System.Windows;
-using System.Windows.Media.Imaging;
-
-namespace Common.Controls
-{
-    /// <summary>
-    /// Interaction logic for MessageTile.xaml
-    /// </summary>
-    public partial class MessageTile
-    {
-        public MessageTile()
-        {
-            InitializeComponent();
-        }
-
-        // Dependency Properties
-
-        #region DisplayIcon
-
-        /// <summary>
-        /// Icon for the tile
-        /// </summary>
-        public static readonly DependencyProperty DisplayIconProperty =
-            DependencyProperty.Register("DisplayIcon",
-                typeof(BitmapImage),
-                typeof(MessageTile),
-                new PropertyMetadata(null));
-
-        [Bindable(true)]
-        public BitmapImage DisplayIcon
-        {
-            get { return (BitmapImage)this.GetValue(DisplayIconProperty); }
-            set { this.SetValue(DisplayIconProperty, value); }
-        }
-        #endregion
-
-        #region DisplayCount
-
-        /// <summary>
-        /// Display count for the tile
-        /// </summary>
-        public static readonly DependencyProperty DisplayCountProperty =
-            DependencyProperty.Register("DisplayCount",
-                typeof(int),
-                typeof(MessageTile),
-                new UIPropertyMetadata(0));
-
-        public int DisplayCount
-        {
-            get { return (int) this.GetValue(DisplayCountProperty); }
-            set { this.SetValue(DisplayCountProperty, value); }
-        }
-
-        #endregion
-
-        #region DisplayText
-
-        /// <summary>
-        /// Main Display text for the tile
-        /// </summary>
-        public static readonly DependencyProperty DisplayTextProperty =
-            DependencyProperty.Register("DisplayText",
-                typeof(string),
-                typeof(MessageTile),
-                new PropertyMetadata("Not set"));
-
-        [Bindable(true)]
-        public string DisplayText
-        {
-            get { return (string) this.GetValue(DisplayTextProperty); }
-            set { this.SetValue(DisplayTextProperty, value); }
-        }
-        #endregion
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Messaging/Common/Controls/MetroTile.cs	Tue Mar 27 16:15:45 2012 +0100
@@ -0,0 +1,143 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+
+namespace Common.Controls
+{
+    [TemplatePart(Name="PART_DISPLAY_ICON", Type=typeof(Image))]
+    [TemplatePart(Name = "PART_DISPLAY_COUNT_CONTAINER", Type = typeof(TextBlock))]
+    [TemplatePart(Name = "PART_DISPLAY_TITLE_CONTAINER", Type = typeof(TextBlock))]
+    public class MetroTile : UserControl
+    {
+
+        #region Constructor
+        
+        static MetroTile()
+        {
+            DefaultStyleKeyProperty.OverrideMetadata(typeof(MetroTile),
+                new FrameworkPropertyMetadata(typeof(MetroTile)));
+
+            CommandManager.RegisterClassCommandBinding(
+                typeof(MetroTile),
+                new CommandBinding(ResetCountCommand, OnResetCountCommand));
+        }
+
+        #endregion
+
+        #region Dependency Properties
+
+        #region DisplayIcon
+
+        /// <summary>
+        /// Icon for the tile
+        /// </summary>
+        public static readonly DependencyProperty DisplayIconProperty =
+            DependencyProperty.Register("DisplayIcon",
+                                        typeof(Image),
+                                        typeof(MetroTile),
+                                        new PropertyMetadata(null));
+
+        public Image DisplayIcon
+        {
+            get { return (Image) this.GetValue(DisplayIconProperty); }
+            set { this.SetValue(DisplayIconProperty, value); }
+        }
+        #endregion
+
+        #region DisplayCount
+
+        /// <summary>
+        /// Display count for the tile
+        /// </summary>
+        public static readonly DependencyProperty DisplayCountProperty =
+            DependencyProperty.Register("DisplayCount",
+                                        typeof(int),
+                                        typeof(MetroTile),
+                                        new UIPropertyMetadata(0));
+
+        public int DisplayCount
+        {
+            get { return (int)this.GetValue(DisplayCountProperty); }
+            set { this.SetValue(DisplayCountProperty, value); }
+        }
+
+        #endregion
+
+        #region DisplayText
+
+        /// <summary>
+        /// Main Display text for the tile
+        /// </summary>
+        public static readonly DependencyProperty DisplayTextProperty =
+            DependencyProperty.Register("DisplayText",
+                                        typeof(string),
+                                        typeof(MetroTile),
+                                        new PropertyMetadata("Not set"));
+
+        public string DisplayText
+        {
+            get { return (string)this.GetValue(DisplayTextProperty); }
+            set { this.SetValue(DisplayTextProperty, value); }
+        }
+        #endregion
+
+        #endregion
+
+        #region Events
+
+        public static readonly RoutedEvent DisplayCountChangedEvent =
+            EventManager.RegisterRoutedEvent("DisplayCountChanged",
+                                            RoutingStrategy.Bubble,
+                                            typeof(RoutedEventHandler),
+                                            typeof(MetroTile));
+
+        public event RoutedEventHandler DisplayCountChanged
+        {
+            add { AddHandler(DisplayCountChangedEvent, value); }
+            remove { RemoveHandler(DisplayCountChangedEvent, value); }
+        }
+
+        protected virtual void OnDisplayCountChanged(int oldValue, int newValue)
+        {
+            //  1. Pair of events: A preview that tunnels and a main event that bubbles
+            //  2. We could also create our own RoutedEventArgs that includes oldValue & new Value
+            
+            var previewEvent = new RoutedEventArgs(PreviewDisplayCountChangedEvent);
+            RaiseEvent(previewEvent);
+
+            var e = new RoutedEventArgs(DisplayCountChangedEvent);
+            RaiseEvent(e);
+        }
+
+        public static readonly RoutedEvent PreviewDisplayCountChangedEvent =
+            EventManager.RegisterRoutedEvent("PreviewDisplayCountChanged",
+                                            RoutingStrategy.Tunnel,
+                                            typeof(RoutedEventHandler),
+                                            typeof(MetroTile));
+
+        public event RoutedEventHandler PreviewDisplayCountChanged
+        {
+            add { AddHandler(PreviewDisplayCountChangedEvent, value); }
+            remove { RemoveHandler(PreviewDisplayCountChangedEvent, value); }
+        }
+
+        #endregion
+
+        #region Commands
+
+        public static readonly ICommand ResetCountCommand =
+            new RoutedUICommand("ResetCount", "ResetCount", typeof(MetroTile));
+
+        private static void OnResetCountCommand(object sender, ExecutedRoutedEventArgs e)
+        {
+            var target = (MetroTile)sender;
+            target.DisplayCount = 0;
+        }
+
+        #endregion
+
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Messaging/Common/Themes/Generic.xaml	Tue Mar 27 16:15:45 2012 +0100
@@ -0,0 +1,76 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:c="clr-namespace:Common.Controls">
+
+    <ResourceDictionary.MergedDictionaries>
+        <ResourceDictionary Source="/Elysium.Theme;component/Themes/SharedResources.xaml" />
+    </ResourceDictionary.MergedDictionaries>
+
+    <Style TargetType="{x:Type c:MetroTile}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type c:MetroTile}">
+                    <Grid Background="Black">
+
+                        <Grid.RowDefinitions>
+                            <RowDefinition Height="*" />
+                            <RowDefinition Height="*" />
+                            <RowDefinition Height="1.25*" />
+                        </Grid.RowDefinitions>
+
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="*" />
+                            <ColumnDefinition Width="*" />
+                        </Grid.ColumnDefinitions>
+
+                        <Image x:Name="PART_DISPLAY_ICON"
+                               Grid.Row="0"
+                               Grid.Column="0"
+                               Margin="10,10,0,0"
+                               HorizontalAlignment="Left"
+                               VerticalAlignment="Top"
+                               Source="{Binding Path=DisplayIcon,
+                                                RelativeSource={RelativeSource FindAncestor,
+                                                                               AncestorType=c:MetroTile,
+                                                                               AncestorLevel=1},
+                                                UpdateSourceTrigger=PropertyChanged}"
+                               Stretch="None" />
+
+                        <TextBlock x:Name="PART_DISPLAY_COUNT_CONTAINER"
+                                   Grid.Row="1"
+                                   Grid.Column="0"
+                                   Grid.ColumnSpan="2"
+                                   Margin="0,0,10,0"
+                                   HorizontalAlignment="Right"
+                                   FontSize="48"
+                                   Foreground="White"
+                                   Text="{Binding Path=DisplayCount,
+                                                  StringFormat=N0,
+                                                  RelativeSource={RelativeSource FindAncestor,
+                                                                                 AncestorType=c:MetroTile,
+                                                                                 AncestorLevel=1},
+                                                  UpdateSourceTrigger=PropertyChanged}" />
+
+                        <TextBlock x:Name="PART_DISPLAY_TITLE_CONTAINER"
+                                   Grid.Row="2"
+                                   Grid.RowSpan="2"
+                                   Grid.Column="0"
+                                   Grid.ColumnSpan="3"
+                                   Margin="10"
+                                   HorizontalAlignment="Right"
+                                   VerticalAlignment="Bottom"
+                                   FontSize="24"
+                                   Foreground="White"
+                                   Text="{Binding Path=DisplayText,
+                                                  RelativeSource={RelativeSource FindAncestor,
+                                                                                 AncestorType=c:MetroTile,
+                                                                                 AncestorLevel=1},
+                                                  UpdateSourceTrigger=PropertyChanged}"
+                                   TextWrapping="Wrap" />
+                    </Grid>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+</ResourceDictionary>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Messaging/Common/Themes/MetroColours.xaml	Tue Mar 27 16:15:45 2012 +0100
@@ -0,0 +1,28 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Color x:Key="MetroMagenta">#FF0097</Color>
+    <Color x:Key="MetroPurple">#A200FF</Color>
+    <Color x:Key="MetroTeal">#00ABA9</Color>
+    <Color x:Key="MetroLime">#8CBF26</Color>
+    <Color x:Key="MetroBrown">#996600</Color>
+    <Color x:Key="MetroPink">#FF0097</Color>
+    <Color x:Key="MetroOrange">#F09609</Color>
+    <Color x:Key="MetroBlue">#1BA1E2</Color>
+    <Color x:Key="MetroLightBlue">#FFB2E0F4</Color>
+    <Color x:Key="MetroRed">#E51400</Color>
+    <Color x:Key="MetroGreen">#339933</Color>
+    <Color x:Key="MetroGray">#FFF2F2F2</Color>
+    <Color x:Key="MetroWhite">#FFFFEEEE</Color>
+    <SolidColorBrush x:Key="MetroMagentaBrush" Color="{StaticResource MetroMagenta}" />
+    <SolidColorBrush x:Key="MetroPurpleBrush" Color="{StaticResource MetroPurple}" />
+    <SolidColorBrush x:Key="MetroTealBrush" Color="{StaticResource MetroTeal}" />
+    <SolidColorBrush x:Key="MetroLimeBrush" Color="{StaticResource MetroLime}" />
+    <SolidColorBrush x:Key="MetroBrownBrush" Color="{StaticResource MetroBrown}" />
+    <SolidColorBrush x:Key="MetroPinkBrush" Color="{StaticResource MetroPink}" />
+    <SolidColorBrush x:Key="MetroOrangeBrush" Color="{StaticResource MetroOrange}" />
+    <SolidColorBrush x:Key="MetroBlueBrush" Color="{StaticResource MetroBlue}" />
+    <SolidColorBrush x:Key="MetroLightBlueBrush" Color="{StaticResource MetroLightBlue}" />
+    <SolidColorBrush x:Key="MetroRedBrush" Color="{StaticResource MetroRed}" />
+    <SolidColorBrush x:Key="MetroGreenBrush" Color="{StaticResource MetroGreen}" />
+    <SolidColorBrush x:Key="MetroGrayBrush" Color="{StaticResource MetroGray}" />
+    <SolidColorBrush x:Key="MetroWhiteBrush" Color="{StaticResource MetroWhite}" />
+</ResourceDictionary>
\ No newline at end of file
--- a/Messaging/Server/App.xaml	Thu Mar 22 08:42:03 2012 +0000
+++ b/Messaging/Server/App.xaml	Tue Mar 27 16:15:45 2012 +0100
@@ -10,36 +10,14 @@
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="/Elysium.Theme;component/Themes/Generic.xaml" />
+                <ResourceDictionary Source="/Common;component/Themes/MetroColours.xaml" />
+                <ResourceDictionary Source="/Common;component/Themes/Generic.xaml" />
             </ResourceDictionary.MergedDictionaries>
             <!--  Bug in .Net 4: http://connect.microsoft.com/VisualStudio/feedback/details/555322/global-wpf-styles-are-not-shown-when-using-2-levels-of-references  -->
             <Style TargetType="{x:Type Window}" />
             <local:Locator x:Key="Locator" d:IsDataSource="True" />
-            <Color x:Key="MetroMagenta">#FF0097</Color>
-            <Color x:Key="MetroPurple">#A200FF</Color>
-            <Color x:Key="MetroTeal">#00ABA9</Color>
-            <Color x:Key="MetroLime">#8CBF26</Color>
-            <Color x:Key="MetroBrown">#996600</Color>
-            <Color x:Key="MetroPink">#FF0097</Color>
-            <Color x:Key="MetroOrange">#F09609</Color>
-            <Color x:Key="MetroBlue">#1BA1E2</Color>
-            <Color x:Key="MetroLightBlue">#FFB2E0F4</Color>
-            <Color x:Key="MetroRed">#E51400</Color>
-            <Color x:Key="MetroGreen">#339933</Color>
-            <Color x:Key="MetroGray">#FFF2F2F2</Color>
-            <SolidColorBrush x:Key="MetroMagentaBrush" Color="{StaticResource MetroMagenta}" />
-            <SolidColorBrush x:Key="MetroPurpleBrush" Color="{StaticResource MetroPurple}" />
-            <SolidColorBrush x:Key="MetroTealBrush" Color="{StaticResource MetroTeal}" />
-            <SolidColorBrush x:Key="MetroLimeBrush" Color="{StaticResource MetroLime}" />
-            <SolidColorBrush x:Key="MetroBrownBrush" Color="{StaticResource MetroBrown}" />
-            <SolidColorBrush x:Key="MetroPinkBrush" Color="{StaticResource MetroPink}" />
-            <SolidColorBrush x:Key="MetroOrangeBrush" Color="{StaticResource MetroOrange}" />
-            <SolidColorBrush x:Key="MetroBlueBrush" Color="{StaticResource MetroBlue}" />
-            <SolidColorBrush x:Key="MetroLightBlueBrush" Color="{StaticResource MetroLightBlue}" />
-            <SolidColorBrush x:Key="MetroRedBrush" Color="{StaticResource MetroRed}" />
-            <SolidColorBrush x:Key="MetroGreenBrush" Color="{StaticResource MetroGreen}" />
-            <SolidColorBrush x:Key="MetroGrayBrush" Color="{StaticResource MetroGray}" />
 
-            <BitmapImage x:Key="Mail" UriSource="pack://application:,,,/Common;component/Icons/Mail.png" />
+            <Image x:Key="Mail" Source="pack://application:,,,/Common;component/Icons/mail.png" />
 
         </ResourceDictionary>
     </Application.Resources>
--- a/Messaging/Server/Server.csproj	Thu Mar 22 08:42:03 2012 +0000
+++ b/Messaging/Server/Server.csproj	Tue Mar 27 16:15:45 2012 +0100
@@ -15,6 +15,8 @@
     <FileAlignment>512</FileAlignment>
     <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
     <WarningLevel>4</WarningLevel>
+    <Utf8Output>true</Utf8Output>
+    <ExpressionBlendVersion>4.0.20525.0</ExpressionBlendVersion>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
     <PlatformTarget>x86</PlatformTarget>
--- a/Messaging/Server/UI/MainWindow.xaml	Thu Mar 22 08:42:03 2012 +0000
+++ b/Messaging/Server/UI/MainWindow.xaml	Tue Mar 27 16:15:45 2012 +0100
@@ -11,8 +11,11 @@
               MinWidth="700"
               MinHeight="475"
               DataContext="{Binding MainWindowViewModel,
-                                    Source={StaticResource Locator}}"
-              Icon="{StaticResource Mail}">
+                                    Source={StaticResource Locator}}">
+
+    <Window.Resources>
+        <Image x:Key="MailIcon" Source="mail.ico" />
+    </Window.Resources>
 
     <TabControl Margin="{Binding Source={x:Static metro:Parameters.Instance}, Path=BoldPadding, Mode=OneWay}">
         <TabItem Header="dashboard">
@@ -54,34 +57,37 @@
                               IsChecked="{Binding ZeroMqEndPoint.IsListening}"
                               IsEnabled="True" />
 
-                <c:MessageTile Grid.Row="1"
-                               Grid.Column="0"
-                               Background="{StaticResource MetroPurpleBrush}"
-                               DisplayCount="{Binding MsmqEndPoint.DisplayCount,
-                                                      Mode=TwoWay,
-                                                      UpdateSourceTrigger=PropertyChanged}"
-                               DisplayIcon="{StaticResource Mail}"
-                               DisplayText="{Binding MsmqEndPoint.DisplayText}"
-                               Foreground="White"
-                               ToolTip="{Binding MsmqEndPoint.ToolTip}" />
+                <c:MetroTile Grid.Row="1"
+                             Grid.Column="0"
+                             DisplayCount="{Binding MsmqEndPoint.DisplayCount}"
+                             DisplayIcon="{StaticResource Mail}"
+                             DisplayText="{Binding MsmqEndPoint.DisplayText}"
+                             Margin="10"
+                             Foreground="White"
+                             ToolTip="{Binding MsmqEndPoint.ToolTip}" />
+
 
-                <c:MessageTile Grid.Row="1"
-                               Grid.Column="1"
-                               Background="{StaticResource MetroGreenBrush}"
-                               DisplayCount="{Binding RabbitEndPoint.DisplayCount}"
-                               DisplayIcon="{StaticResource Mail}"
-                               DisplayText="{Binding RabbitEndPoint.DisplayText}"
-                               Foreground="White"
-                               ToolTip="{Binding RabbitEndPoint.ToolTip}" />
+                <c:MetroTile Grid.Row="1"
+                             Grid.Column="1"
+                             Margin="10"
+                             Background="{StaticResource MetroGreenBrush}"
+                             DisplayCount="{Binding RabbitEndPoint.DisplayCount}"
+                             DisplayIcon="{StaticResource Mail}"
+                             DisplayText="{Binding RabbitEndPoint.DisplayText}"
+                             Foreground="White"
+                             ToolTip="{Binding RabbitEndPoint.ToolTip}" />
 
-                <c:MessageTile Grid.Row="1"
-                               Grid.Column="2"
-                               Background="{StaticResource MetroOrangeBrush}"
-                               DisplayCount="{Binding ZeroMqEndPoint.DisplayCount}"
-                               DisplayIcon="{StaticResource Mail}"
-                               DisplayText="{Binding ZeroMqEndPoint.DisplayText}"
-                               Foreground="White"
-                               ToolTip="{Binding ZeroMqEndPoint.ToolTip}" />
+                <c:MetroTile Grid.Row="1"
+                             Grid.Column="2"
+                             Margin="10"
+                             Background="{StaticResource MetroOrangeBrush}"
+                             DisplayCount="{Binding ZeroMqEndPoint.DisplayCount}"
+                             DisplayIcon="{StaticResource Mail}"
+                             DisplayText="{Binding ZeroMqEndPoint.DisplayText}"
+                             Foreground="White"
+                             RenderTransformOrigin="0.5,0.5"
+                             ToolTip="{Binding ZeroMqEndPoint.ToolTip}" />
+
                 <ScrollViewer Grid.Row="2"
                               Grid.Column="0"
                               Xaml:XamlHelper.AutoScroll="{Binding MsmqEndPoint.IsLogChanged}">