diff Messaging/Common/Controls/MetroTile.cs @ 36:c8c79f05d76f

WORKING VERSION! HIGH FIVE!
author adminsh@apollo
date Tue, 27 Mar 2012 18:33:44 +0100
parents 83c1f62d9370
children
line wrap: on
line diff
--- a/Messaging/Common/Controls/MetroTile.cs	Tue Mar 27 16:15:45 2012 +0100
+++ b/Messaging/Common/Controls/MetroTile.cs	Tue Mar 27 18:33:44 2012 +0100
@@ -1,18 +1,17 @@
-using System;
+using System.ComponentModel;
 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
+    [Description("Represents a metro styled tile that displays an icon, a count and a title")]
+    public class MetroTile : Control
     {
-
         #region Constructor
         
         static MetroTile()
@@ -31,33 +30,30 @@
 
         #region DisplayIcon
 
-        /// <summary>
-        /// Icon for the tile
-        /// </summary>
         public static readonly DependencyProperty DisplayIconProperty =
             DependencyProperty.Register("DisplayIcon",
-                                        typeof(Image),
-                                        typeof(MetroTile),
+                                        typeof (ImageSource),
+                                        typeof (MetroTile),
                                         new PropertyMetadata(null));
 
-        public Image DisplayIcon
+        [Description("The icon displayed in the tile."), Category("Common Properties")]
+        public ImageSource DisplayIcon
         {
-            get { return (Image) this.GetValue(DisplayIconProperty); }
+            get { return (ImageSource)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));
 
+        [Description("The count displayed in the tile."), Category("Common Properties")]
         public int DisplayCount
         {
             get { return (int)this.GetValue(DisplayCountProperty); }
@@ -67,10 +63,8 @@
         #endregion
 
         #region DisplayText
-
-        /// <summary>
-        /// Main Display text for the tile
-        /// </summary>
+        
+        [Description("The text displayed in the tile."), Category("Common Properties")]
         public static readonly DependencyProperty DisplayTextProperty =
             DependencyProperty.Register("DisplayText",
                                         typeof(string),