12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media.Imaging;
- namespace CCDCountWpf
- {
- public class ShowBindingClass : INotifyPropertyChanged
- {
- private string teststring = "测试";
- public string TestString
- {
- get { return teststring; }
- set
- {
- teststring = value;
- OnPropertyChanged("TestString");
- }
- }
- private BitmapImage bitmapImage;
- public BitmapImage BitmapImage
- {
- get { return bitmapImage; }
- set
- {
- bitmapImage = value;
- OnPropertyChanged("BitmapImage");
- }
- }
- public event PropertyChangedEventHandler PropertyChanged;
- protected void OnPropertyChanged(string propertyName)
- {
- PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
- }
- }
- }
|