0

My program works fine on my system, the problem is that my mate is using win7 and Iam using win10. The buttons and the whole window is adjusted on win7.

So I think to work with ClientSize but I don't have a real solution.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Pinotek
  • 3
  • 8

1 Answers1

0

WPF picks a default theme determined by the operating system version. This is so it's consistent with the user's experiece of the operating system. It's usually fine on most applications, but becomes a problem with more complex UX design.

If you want your system to look the same, you have to force-load a specific operating system theme.

Add this in your Application Startup event:

Uri uri = new Uri(“PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;component\\themes/aero.normalcolor.xaml”, UriKind.Relative);

Resources.MergedDictionaries.Add(Application.LoadComponent(uri) as ResourceDictionary); 
Joe
  • 6,773
  • 2
  • 47
  • 81