Click here to Skip to main content
11,703,438 members (72,212 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C# WPF .NET4
I have used Labels on top of my screen to which I have assigned margin values in xaml. Its working perfectly alright in my machine, but when I tested my code on other machine the labels are getting shifted to right. I have placed the labels inside a grid. Is there any thing that I am missing. Please help

Posted 4-Apr-13 3:14am
ThePhantomUpvoter at 4-Apr-13 9:21am
How would we know if you are missing something?
Member 9964896 at 4-Apr-13 9:46am
Is there any code or propertly in wpf which gives common alignment for controls, so that evevn in different machines the alignment doesn't changes

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

It is possible that the other machine has their display settings different than you. In Windows 7 the user can use
"Smaller - 100% (default)"
"Medium - 125%"
"Larger - 150%"
Tehse settings can be found by typing display in the search/run command.

When users do this it does make the text larger but alignment often gets messed up. I have chased my tail many times on this to discover they had altered their settings from the default. I would check to see if that is the case. If it is you can atleast see how it will look for those users before you deploy (change the setting and then log off and back on, then run).
Marcus Kramer at 4-Apr-13 14:18pm
+5. Sound suggestions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 540
1 Sergey Alexandrovich Kryukov 400
2 OriginalGriff 340
3 Andy Lanng 124
4 Matt T Heffron 115
0 OriginalGriff 8,519
1 Sergey Alexandrovich Kryukov 7,667
2 CPallini 4,987
3 Maciej Los 4,686
4 Mika Wendelius 3,566

Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 4 Apr 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100