• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Working With Layouts in WCF

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

 

 

Summary
Review Date
Reviewed Item
Working With Layouts in WCF
Author Rating
5

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Working With Layouts in WCF"

Leave a Message

Your email address will not be published. Required fields are marked *

Site Disclaimer, Copyright © 2016 - All Rights Reserved.