26
|
1 using System;
|
|
2 using System.ComponentModel;
|
|
3 using System.Windows;
|
|
4 using System.Windows.Media;
|
|
5 using System.Windows.Media.Imaging;
|
|
6
|
|
7 namespace Common.Controls
|
|
8 {
|
|
9 /// <summary>
|
|
10 /// Interaction logic for MessageTile.xaml
|
|
11 /// </summary>
|
|
12 public partial class MessageTile
|
|
13 {
|
|
14 public MessageTile()
|
|
15 {
|
|
16 InitializeComponent();
|
|
17 }
|
|
18
|
|
19 #region Dependency Properties
|
|
20
|
|
21 #region DisplayIcon
|
|
22
|
|
23 /// <summary>
|
|
24 /// Icon for the tile
|
|
25 /// </summary>
|
|
26 public static readonly DependencyProperty DisplayIconProperty =
|
|
27 DependencyProperty.Register("DisplayIcon",
|
|
28 typeof(BitmapImage),
|
|
29 typeof(MessageTile),
|
|
30 new PropertyMetadata(null));
|
|
31
|
|
32 [Bindable(true)]
|
|
33 public BitmapImage DisplayIcon
|
|
34 {
|
|
35 get { return (BitmapImage)this.GetValue(DisplayIconProperty); }
|
|
36 set { this.SetValue(DisplayIconProperty, value); }
|
|
37 }
|
|
38 #endregion
|
|
39
|
|
40 #region DisplayCount
|
|
41
|
|
42 /// <summary>
|
|
43 /// Display count for the tile
|
|
44 /// </summary>
|
|
45 public static readonly DependencyProperty DisplayCountProperty =
|
|
46 DependencyProperty.Register("DisplayCount",
|
|
47 typeof(int),
|
|
48 typeof(MessageTile),
|
27
|
49 new UIPropertyMetadata(0));
|
26
|
50
|
|
51 public int DisplayCount
|
|
52 {
|
|
53 get { return (int) this.GetValue(DisplayCountProperty); }
|
|
54 set { this.SetValue(DisplayCountProperty, value); }
|
|
55 }
|
27
|
56
|
26
|
57 #endregion
|
|
58
|
|
59 #region DisplayText
|
|
60
|
|
61 /// <summary>
|
|
62 /// Main Display text for the tile
|
|
63 /// </summary>
|
|
64 public static readonly DependencyProperty DisplayTextProperty =
|
|
65 DependencyProperty.Register("DisplayText",
|
|
66 typeof(string),
|
|
67 typeof(MessageTile),
|
|
68 new PropertyMetadata("Not set"));
|
|
69
|
|
70 [Bindable(true)]
|
|
71 public string DisplayText
|
|
72 {
|
|
73 get { return (string) this.GetValue(DisplayTextProperty); }
|
|
74 set { this.SetValue(DisplayTextProperty, value); }
|
|
75 }
|
|
76 #endregion
|
|
77
|
|
78 #endregion
|
|
79 }
|
|
80 }
|