UnigramDev/Unigram/gift-variants-win10 • d730aa9 • 2 files, +6/-2
Fix InvalidCastException opening the gift variants popup on Windows 10
ListViewItemPresenter.SelectedBorderBrush, SelectedPointerOverBorderBrush and
SelectedPressedBorderBrush are declared on IListViewItemPresenter4, introduced
in UniversalApiContract 13.0 (build 22621). On older builds the QueryInterface
behind the setter fails and the projection throws, so GiftVariantsPopup crashed
as soon as the first container was realized.
Guard the three assignments on the property actually being present. Where it is
not, the selection border keeps its default brush.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
#unigram
Post #20621
50