I've created an WPF application that should run on Win7 and Win10. It displays some ListBoxes and I designed it on Win7 - all looks well! Now I run it on Win10 and it looks very wiered. The ListBoxItems are larger than the ones on Win7 and so they display scrollbars where no scrollbar should be.
After some testing with snoop I see that the Border and the Padding of the ListBoxItem has changed.
In Win7: Border="0,0,0,0" Padding="2,0,0,0"
In Win10: Border="1,1,1,1" Padding="4,1,4,1"
Were does this come from?
How can I prevent such errors? It couldn't be that I must set all values of all WPF Elements to an explicit default value, just to be sure they stay the same under Win10.