Click here to Skip to main content
15,889,651 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

Is it good to completely depend on Margin(0,0,0,0) for defining layout in windows phone. If not is there any other option to define layout.

Can anyone please suggest me

Regards
Posted

It really depends on the container that you are placing your elements into. There are primarily three different types of controls that you will use as containers:

<Canvas>
<StackPanel>
<Grid>

I wrote each of those articles related to Silverlight, but the code in the examples is identical to what you would write in a Windows 8 application today.
 
Share this answer
 
to be more professional you should use the row and column definition property of Grid control.
here is a complete example:
http://msdn.microsoft.com/en-us/library/system.windows.controls.rowdefinition(v=vs.95).aspx[^]

if you found that useful please don't forget to mark as solution.
Regards
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900