rocksdanister / weather

Windows native weather app powered by DirectX12 animations
https://rocksdanister.com/weather
MIT License
393 stars 21 forks source link

Fix ListViewItem style incorrect on windows 10 #70

Closed zxbmmmmmmmmm closed 2 months ago

zxbmmmmmmmmm commented 2 months ago

Fix #54 .

image ListView will use the system's ItemContainerStyle, but this will cause exceptions on Windows 10.

For example, in Windows 11, HorizontalContentAlignment is set to Stretch, but on Windows 10 it is Left, which results in the issue

I rewrote this style to fix it, and we can apply ItemContainerStyle="{ThemeResource ListViewItemStyle}" to solve the same problem in other ListView

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

rocksdanister commented 2 months ago

Thanks for the contribution, didn't know styles changed like this between Windows 🤔

There is one problem in my Windows 11 machine, there seem to be more padding:

New style

modified_listview

Original

original_listview
zxbmmmmmmmmm commented 2 months ago

image I reduced some padding, it should be normal now