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