Then we have two rows with the first one having twice the space than the second one. You then have three rows with equal space (1/3 of the available space), since you defined * for all then it will acquire equal space. Note: If I have defined it in such a way as: I have done the same for the column definition. There I have defined three rows and three columns, where the height of the first and last row has 100pixels and the second one has the rest of the amount (* denotes the rest of the available space). It's just like defining like your table using and in HTML. So, drag a Grid control onto the MainPage and define your Grid. Margin="," in other wiords, in a clock-wise direction. If Margin="10,20,30,50" then that tells, you are giving various units for every corner. If Margin="20" then the controls inside the stack will leave 20 units from every corner (left, top, right and bottom). Margin: Margin decides the spacing around its surrounding. Width: Defines the width of the StackPanel in numeric value. Height: Defines the height of StackPanel using a numeric value. In Horizontal Orientation, stacks are horizontal aligned and in Vertical stacks, they are in vertical aligned. Orientation: Either Vertical or Horizontal. Name: It will be any unique name for the StackPanel, since it's recognized in the code. And stacks are either arranged vertically or horizontally. Since these are the most used layout in Windows Phone Development.Īs the name suggests, it arranges the objects in a Stack. In this article, we will explain about Grid, StackPanel and WrapPanel only. In this particular article, we are targeting Windows Phone Development.įigure: A small ListBox demonstration using various layouts in WP What good would great code be if you have the worst User Interface for your app. But, the design of the layout is as necessary as the coding itself is. Since are planning to develop for various sized screens, in a broader way, it's not about screen dimensions but it's about the great User Interface, what a sole job of an App Developer. In every platform, we have a layout definition. We are in App Development either it is Android, Windows Phone or Apple iPhone.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |