We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to configure the CardLayout control?

CardLayout is Layout container type of control that helps to arrange controls in stack order and one control will be visible at the time. These below two ways are used to configure the controls added in CardLayout.

 

  1. Through Designer
  2. Through Code

 

i.   Through Designer

 

Step 1: Add the CardLayout Control on Form.

 

Drag and drop the CardLayout Control on Form. Please refer the below Screenshot.

 

Screenshot

 

Step 2: Add Controls on Form 

 

Drag and drop the required controls in Form. If Form contains CardLayout Manager, dragged control will be directly added as Card.  

 

Please refer the below Screenshot 

 

Screenshot

 

 

Figure: Radial Gauge is added as Card1

 

Step 3: Set the CardName.

 

Need to set the Card Name based on requirement. Please refer the below Screenshot.

 

Screenshot

 

 

ii. Through Code

 

Need to follow the below step for CardLayout configuration Through Code.

 

Step 1: Need to add required Controls on Form

 

Please make use of the below Code snippet.

 

Code Example [C#]

 

 

Code Example [VB]

 

 

Step 2: Integrate into CardLayout control by assigning Card name.

 

Need to set the Card Name based on requirement. Please refer the below Code snippet.

 

Code Example [C#]

 

 

Code Example [VB]

 

 

Sample

 

C#: CardLayoutExample

 

VB: CardLayoutExample

Article ID: Published Date: Last Revised Date: Platform: Control:
8071 11/15/2017 11/15/2017 Windows Forms CardLayout
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.