Until the windows phone development begins (1)

In order to get started with windows phone development, you need to know some tools that exist in it and without which you are incomplete to build an application. So, three basic tools that i am gonna talk about are: Canvas, Grid and Stack-Panel, which helps in designing an interface of your application.

Canvas:

Canvas is layout tool as i mentioned above which helps you in designing your application but there is a problem in designing with canvas and that is absolute positioning. It means when you create your application, the interface will be designed in position hard-coded by developer. So, it means that same pixel size will be specified for all the devices which results in distortion of interface in bigger LCD devices. So, canvas will not be useful, anymore, if you want to create you application for multiple devices.

Following is the example of putting canvas into your code.

<code>

<canvas>

<button> Hello World </button>

</canvas>

</code>

Grid:

The next thing that we will be discussing is grid. It helps you in controlling your screen in form of rows and columns and each of the control will be placed in specific cell. So, grid can be divided into rows and columns and that columns and rows will be used to place controls and design an interactive application.

The problem that arises in case of canvas can now be solved with grid. So, with grid you can customize your layout more easily than the canvas, as canvas intended for custom drawing functionality. 

There is always a negativity when you get some positive things out of something. Good thing about grid is it gives you dynamic solution of designing layout which works with any device. On the other hand, if you place control in same row or column the grid will place on top of the first one. 

if someone wants to add grid into your code do it like this:

<code>

<Grid>

<Button>Hi there</Button>

<Grid>

</code>

Stack-Panel:

This tool really helps when you want to place controls one after the another. So, just like stack this tool provides you to arrange child elements into a single line that can be oriented vertically or horizontally. Just like other two tools we discussed this stack panel is also inherited from panel class.

This very tool does not place object on top of the previous one but as name implies this tool helps you to arrange and place control right after the another.

if someone wants to add Stack-Panel into your code do it like this:

<code>

<Stackpanel>

<Button>Hi there</Button>

</Stackpanel>

</code>

So, if someone ask me what to use with your application design i would recommend to understand the situation.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s