3 using System
.Windows
.Controls
;
4 using System
.Windows
.Data
;
5 using System
.Windows
.Documents
;
6 using System
.Windows
.Media
;
7 using System
.Windows
.Media
.Imaging
;
8 using System
.Windows
.Navigation
;
9 using System
.Windows
.Shapes
;
10 using System
.Windows
.Input
;
11 using System
.ComponentModel
;
16 /// Interaction logic for CommandLink.xaml
19 public partial class CommandLink
: UserControl
, INotifyPropertyChanged
23 this.DataContext
= this;
25 InitializeComponent();
27 this.button
.Click
+= new RoutedEventHandler(button_Click
);
31 void button_Click(object sender
, RoutedEventArgs e
)
39 RoutedUICommand command
;
41 public RoutedUICommand Command
43 get { return command; }
44 set { command = value; }
47 public event RoutedEventHandler Click
;
58 if (PropertyChanged
!= null)
60 PropertyChanged(this, new PropertyChangedEventArgs("Link"));
72 if (PropertyChanged
!= null)
74 PropertyChanged(this, new PropertyChangedEventArgs("Note"));
78 private ImageSource icon
;
80 public ImageSource Icon
86 if (PropertyChanged
!= null)
88 PropertyChanged(this, new PropertyChangedEventArgs("Icon"));
97 return button
.IsChecked
;
99 set { button.IsChecked = value; }
103 #region INotifyPropertyChanged Members
105 public event PropertyChangedEventHandler PropertyChanged
;