I choose WPF as my first Windows-based App Framework in 2025

Windows Presentation Foundation (WPF) was born in November 21, 2006. At that time i was a “child” who only know use VB.NET to creat old fashion GUI Application. At that time I prefer find a app than creat one by my-996-self.Not crazy about coding. The Beginning The meaningful time is about 2016.Microsoft released Universal Windows Platform(UWP) Framework,coder can code one sample to publish in Windows 10 destop/Windows 10 mobile/XBoxOne. I was so attracted to learn UWP by Channel 9’s video.I learned how to use XAML to design an interface/space and studied .NET syntax. From compiling a simple calculator to run on my Windows 10 PC and my Lumia phone, to flashing Windows 10 IoT on a Raspberry Pi and running my self-built local network media server—those were wonderful times.Back then, in China, platforms like NetEase Cloud Music were among the first to support the UWP framework, bringing countless surprises to users. Unfortunately, we, the 1%, still lost in market. ...

2025-03-20 · 2 min · 407 words

Troubleshooting Property Update Issues in WPF DataGridCheckBoxColumn Bindings

Why does the CheckBox state change in WPF DataGridCheckBoxColumn not automatically update the bound property? Situation: My code has correctly implemented the binding relationship using the MVVM library, but I am unable to filter data using the checkbox in the DataGrid. //model public class SpectralPeakDataItem { public bool IsUserFor { get; set; } public double Wavelength { get; set; } public int PixelPosition { get; set; } public double InstensityPercentage { get; set; } } //ViewModel [ObservableProperty] private ObservableCollection<SpectralPeakDataItem> _mercuryArgonSpectralPeakDataItems = []; <ui:DataGrid Grid.Column="0" Margin="5" AutoGenerateColumns="False" ItemsSource="{Binding MercuryArgonSpectralPeakDataItems, Mode=TwoWay}"> <DataGrid.Columns> <DataGridCheckBoxColumn Binding="{Binding IsUserFor, Mode=TwoWay}" Header="IsUserFor" /> <DataGridTextColumn Binding="{Binding Wavelength, Mode=TwoWay}" Header="Wavelength" /> <DataGridTextColumn Binding="{Binding PixelPosition, Mode=TwoWay}" Header="PixelPosition" /> <DataGridTextColumn Binding="{Binding InstensityPercentage, Mode=TwoWay}" Header="Percentage" /> </DataGrid.Columns> </ui:DataGrid> However, in the usual event-driven code design, it works fine.So, I think this is an issue with MVVM’s data binding, as it doesn’t seem to achieve data synchronization.So next, I discovered that:In a WPF DataGridCheckBoxColumn, the reason why changes in the CheckBox’s checked state do not automatically trigger property updates is primarily because the DataGridCheckBoxColumn uses a binding context that may not directly reflect changes in the CheckBox state. This often involves the following issues: ...

2024-09-03 · 2 min · 363 words