Syncfusion.Shared.Base
Members 


CardLayout Class

Represents the LayoutManager that lays out the children as "Cards".
Syntax
'Declaration
 
<DesignerAttribute(Syncfusion.Windows.Forms.Tools.Design.CardLayoutDesigner, System.ComponentModel.Design.IDesigner)>
<DescriptionAttribute("Represents the layout manager that lays out the children as Cards.")>
<ToolboxBitmapAttribute(Syncfusion.Windows.Forms.PopupControlContainer, "ToolboxIcons.CardLayout.bmp")>
<ToolboxItemFilterAttribute("System.Windows.Forms")>
<ProvidePropertyAttribute("MaintainAspectRatio", System.Windows.Forms.Control)>
<DesignerCategoryAttribute("Component")>
Public Class CardLayout 
   Inherits LayoutManager
   Implements ILayoutManager 
'Usage
 
Dim instance As CardLayout
[Designer(Syncfusion.Windows.Forms.Tools.Design.CardLayoutDesigner, System.ComponentModel.Design.IDesigner)]
[Description("Represents the layout manager that lays out the children as Cards.")]
[ToolboxBitmap(Syncfusion.Windows.Forms.PopupControlContainer, "ToolboxIcons.CardLayout.bmp")]
[ToolboxItemFilter("System.Windows.Forms")]
[ProvideProperty("MaintainAspectRatio", System.Windows.Forms.Control)]
[DesignerCategory("Component")]
public class CardLayout : LayoutManager, ILayoutManager  
Remarks

Each child component is a "Card" with a name attached to it. The CardLayout will display only one Card at a time, allowing you to flip through it. Use the First, Last, Next, Previous, and Show methods to do so.

The LayoutMode property lets you specify whether to lay out the children based on their preferred size or make them fill the parent's client rectangle.

The SetCardName method will expect you to pass a string value indicating the name of the Card as the constraint.

Setting the same Card name for more than one component will result in unforseen conflicts.

During design-time, you can change the order of the child controls being laid out by moving them around using the "Bring to Front" and "Send to Back" verbs provided by the control designer.

Take a look at the LayoutManager class documentation for more information on LayoutManager in general.

Example

Here is some sample code that tells you how to initialize a CardLayout manager:

// Binding a Control to the CardLayout manager programmatically. this.cardLayout1 = new CardLayout(); // Set the container control; all the child controls of this container control are // automatically registered as children with the manager and get default card names. this.cardLayout1.ContainerControl = this.panel1; // Set custom card names to replace default card names. this.cardLayout1.SetCardName(this.label1, "MyCard1"); // To select a card manually, use the SelectedCard property. this.cardLayout1.SelectedCard = "MyCard1"; // Or move through the cards like this: this.cardLayout1.Next(); this.cardLayout1.Previous(); ' Binding a Control to the CardLayout manager programmatically. Me.cardLayout1 = New CardLayout ' Set the target control; all the child controls of this target control are ' automatically registered as children with the manager and get default card names. Me.cardLayout1.ContainerControl = Me.panel1 ' Set custom card names to replace default card names. Me.cardLayout1.SetCardName(Me.label1, "MyCard1") ' To select a card manually, use the SelectedCard property. Me.cardLayout1.SelectedCard = "MyCard1" ' Or move through the cards like this: Me.cardLayout1.Next Me.cardLayout1.Previous

Also, take a look at the project in Tools/Samples/Quick Start%T:Syncfusion.Windows.Forms.Tools.LayoutManager% for an example.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         Syncfusion.Windows.Forms.Tools.LayoutManager
            Syncfusion.Windows.Forms.Tools.CardLayout

AssemblyVersion

Syncfusion.Shared.Base: 17.4460.0.46

See Also