view Messaging/Common/Controls/MessageTile.xaml.cs @ 28:4c0dea4760c5

RabbitMq working
author adminsh@apollo
date Wed, 21 Mar 2012 20:29:04 +0000
parents 96fdf58e05b4
children 7d9de5746f18
line wrap: on
line source

using System;
using System.ComponentModel;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace Common.Controls
{
    /// <summary>
    /// Interaction logic for MessageTile.xaml
    /// </summary>
    public partial class MessageTile
    {
        public MessageTile()
        {
            InitializeComponent();
        }

        #region 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

        #endregion
    }
}