annotate Messaging/Common/Controls/MessageTile.xaml.cs @ 31:7d9de5746f18

Working version
author adminsh@apollo
date Thu, 22 Mar 2012 08:09:41 +0000
parents 96fdf58e05b4
children
rev   line source
31
7d9de5746f18 Working version
adminsh@apollo
parents: 27
diff changeset
1 using System.ComponentModel;
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
2 using System.Windows;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
3 using System.Windows.Media.Imaging;
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
4
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
5 namespace Common.Controls
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
6 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
7 /// <summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
8 /// Interaction logic for MessageTile.xaml
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
9 /// </summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
10 public partial class MessageTile
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
11 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
12 public MessageTile()
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
13 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
14 InitializeComponent();
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
15 }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
16
31
7d9de5746f18 Working version
adminsh@apollo
parents: 27
diff changeset
17 // Dependency Properties
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
18
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
19 #region DisplayIcon
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
20
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
21 /// <summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
22 /// Icon for the tile
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
23 /// </summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
24 public static readonly DependencyProperty DisplayIconProperty =
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
25 DependencyProperty.Register("DisplayIcon",
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
26 typeof(BitmapImage),
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
27 typeof(MessageTile),
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
28 new PropertyMetadata(null));
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
29
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
30 [Bindable(true)]
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
31 public BitmapImage DisplayIcon
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
32 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
33 get { return (BitmapImage)this.GetValue(DisplayIconProperty); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
34 set { this.SetValue(DisplayIconProperty, value); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
35 }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
36 #endregion
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
37
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
38 #region DisplayCount
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
39
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
40 /// <summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
41 /// Display count for the tile
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
42 /// </summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
43 public static readonly DependencyProperty DisplayCountProperty =
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
44 DependencyProperty.Register("DisplayCount",
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
45 typeof(int),
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
46 typeof(MessageTile),
27
96fdf58e05b4 Server working with sockets and rabbitmq
adminsh@apollo
parents: 26
diff changeset
47 new UIPropertyMetadata(0));
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
48
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
49 public int DisplayCount
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
50 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
51 get { return (int) this.GetValue(DisplayCountProperty); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
52 set { this.SetValue(DisplayCountProperty, value); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
53 }
27
96fdf58e05b4 Server working with sockets and rabbitmq
adminsh@apollo
parents: 26
diff changeset
54
26
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
55 #endregion
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
56
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
57 #region DisplayText
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
58
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
59 /// <summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
60 /// Main Display text for the tile
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
61 /// </summary>
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
62 public static readonly DependencyProperty DisplayTextProperty =
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
63 DependencyProperty.Register("DisplayText",
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
64 typeof(string),
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
65 typeof(MessageTile),
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
66 new PropertyMetadata("Not set"));
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
67
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
68 [Bindable(true)]
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
69 public string DisplayText
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
70 {
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
71 get { return (string) this.GetValue(DisplayTextProperty); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
72 set { this.SetValue(DisplayTextProperty, value); }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
73 }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
74 #endregion
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
75 }
045dac571339 Working on data binding to a user control
adminsh@apollo
parents:
diff changeset
76 }