Working With Layouts in WCF

Ratings:
(4)
Views:236
Banner-Img
  • Share this blog:

Working With Layouts

11Layouts are used to display all the controls on the window in a required form 11Layout will help us to keep the controls with same size though parent control size changes or screen resolution changes 11Also layouts will help us to scale the size of the controls a/c to parent control size or a/c to screen resolution   Canvas Layout control Canvas Layout is the fixed layout and the controls placed in canvas layout will not increase or decrease their size when parent control size changes.   Screenshot_3     Example  With Canvas Controls Screenshot_4   Create a new window with the name canvas layout Crete canvas on window Design the canvas Create two buttons outside the canvas with the names b/n LTOR and btn RTOL respectively Write the following code Private void btn LTOR – click (object sender, Ronted Even Args e) { Canvas 1 Flow direction  = flow direction. Left to right; } Private void btn RTOL_click() {canvas1. Flow Direction= flow direction. Right To left; } When you run the form observe the controls by increasing or decreasing the size of the window, the controls placed with the canvas will not increase or decrease their size but the controls outside canvas will increase or decrease their sizes a/c to size of the control  

Stock Panel

Stack panel layout is used to display the elements in the form of stack we can display the elements in vertical stack form or horizontal stack form  

Properties

 

Screenshot_5

  When set to Vertical :  The controls will be displayed or arranged in vertical stack from when set to   Horizontal:   The controls will be organized in horizontal stack form Screenshot_6    

You liked the article?

Like : 0

Vote for difficulty

Current difficulty (Avg): Medium

Recommended Courses

1/15

About Author
Authorlogo
Name
TekSlate
Author Bio

TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.


Stay Updated


Get stories of change makers and innovators from the startup ecosystem in your inbox