using System.ComponentModel; using System.Runtime.CompilerServices; using ChatController.Annotations; namespace ChatController { public partial class ChatControlWaitLayer : INotifyPropertyChanged { private string _DialogText; public string DialogText { get => _DialogText; set { _DialogText = value; OnPropertyChanged(nameof(DialogText)); } } public ChatControlWaitLayer(string dialogText = null) { InitializeComponent(); DataContext = this; DialogText = dialogText ?? "Daten werden übertragen. Bitte warten..."; } public event PropertyChangedEventHandler PropertyChanged; [NotifyPropertyChangedInvocator] protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } } }