view Messaging/Common/Controls/MessageTile.xaml.cs @ 33:f3a0641c1586

bat files added to Messaging solution
author adminsh@apollo
date Thu, 22 Mar 2012 08:11:42 +0000
parents 7d9de5746f18
children
line wrap: on
line source

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
    }
}