WPF component content not updating after view model change
Advertisements I have the following view model: public class ViewModel : ObservableObject { public string Watermark { get; set; } = "Loading…"; } where ObservableObject is from Microsoft.Toolkit.Mvvm.ComponentModel which implements INotifyPropertyChanged and INotifyPropertyChanging. I have the following XAML: <xctk:WatermarkTextBox> <xctk:WatermarkTextBox.WatermarkTemplate> <DataTemplate> <ContentControl Content="{Binding DataContext.Watermark, RelativeSource={RelativeSource AncestorType=Window}}"></ContentControl> </DataTemplate> </xctk:WatermarkTextBox.WatermarkTemplate> </xctk:WatermarkTextBox> And lastly the following C# code:… Read More WPF component content not updating after view model change