menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SwimlaneHeader - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SwimlaneHeader

    Represents the header of a swimlane, phase, or lane.

    Inheritance
    System.Object
    DiagramObject
    NodeBase
    SwimlaneChild
    SwimlaneHeader
    Implements
    IDiagramObject
    System.ICloneable
    Inherited Members
    DiagramObject.GetParent()
    DiagramObject.OnPropertyChanged(String, Object, Object, IDiagramObject)
    NodeBase.AdditionalInfo
    NodeBase.CanAutoLayout
    NodeBase.Flip
    NodeBase.FlipMode
    NodeBase.ID
    NodeBase.IsVisible
    NodeBase.Margin
    NodeBase.SearchTags
    NodeBase.Tooltip
    NodeBase.ZIndex
    SwimlaneChild.Height
    SwimlaneChild.Width
    Namespace: Syncfusion.Blazor.Diagram
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class SwimlaneHeader : SwimlaneChild, IDiagramObject, ICloneable
    Examples

    The following example demonstrates how to set the header of a swimlane:

     
    
    <SfDiagramComponent Height="600px" Width="90%" Swimlanes="@swimlaneCollections"> 
    </SfDiagramComponent> 
    @code { 
       DiagramObjectCollection<Swimlane> swimlaneCollections = new DiagramObjectCollection<Swimlane>(); 
    
       protected override void OnInitialized() 
       { 
           swimlaneCollections = new DiagramObjectCollection<Swimlane>() 
           { 
               new Swimlane() 
               { 
                   ID = "swimlane1", 
                   Orientation = Orientation.Horizontal, 
                   Height = 200, 
                   Width = 450, 
                   Header = new SwimlaneHeader() 
                   { 
                       Annotation = new Annotation() 
                       { 
                           Content = "Header of swimlane" 
                       }, 
                       Height = 30 
                   }, 
               } 
           }; 
       } 
    } 

    Constructors

    SwimlaneHeader()

    Creates a new instance of the header for swimlane

    Declaration
    public SwimlaneHeader()

    SwimlaneHeader(SwimlaneHeader)

    Creates a new instance of the Header from the given Header in Swimlane.

    Declaration
    public SwimlaneHeader(SwimlaneHeader header)
    Parameters
    Type Name Description
    SwimlaneHeader header

    Properties

    Annotation

    Gets or sets the annotation of the header.

    Declaration
    public ShapeAnnotation Annotation { get; set; }
    Property Value
    Type Description
    ShapeAnnotation

    The annotation of the header.

    Remarks

    The annotation represents the content displayed in the header.

    Examples

    The following example demonstrates how to set the annotation of a swimlane header:

     
    
    <SfDiagramComponent Height="600px" Width="90%" Swimlanes="@swimlaneCollections"> 
    </SfDiagramComponent> 
    @code { 
       DiagramObjectCollection<Swimlane> swimlaneCollections = new DiagramObjectCollection<Swimlane>(); 
    
       protected override void OnInitialized() 
       { 
           swimlaneCollections = new DiagramObjectCollection<Swimlane>() 
           { 
               new Swimlane() 
               { 
                   ID = "swimlane1", 
                   Orientation = Orientation.Horizontal, 
                   Height = 200, 
                   Width = 450, 
                   Header = new SwimlaneHeader () 
                   { 
                       Annotation = new Annotation() 
                       { 
                           Content = "Header of swimlane" 
                       }, 
                       Height = 30 
                   }, 
               } 
           }; 
       } 
    } 

    Style

    Gets or sets the style of the header text.

    Declaration
    public TextStyle Style { get; set; }
    Property Value
    Type Description
    TextStyle

    The style of the header text.

    Remarks

    Use this property to apply custom styling to the header text, such as font size, color, or alignment.

    Examples

    The following example demonstrates how to set the style of a swimlane header:

     
    
    <SfDiagramComponent Height="600px" Width="90%" Swimlanes="@swimlaneCollections"> 
    </SfDiagramComponent> 
    @code { 
       DiagramObjectCollection<Swimlane> swimlaneCollections = new DiagramObjectCollection<Swimlane>(); 
    
       protected override void OnInitialized() 
       { 
           swimlaneCollections = new DiagramObjectCollection<Swimlane>() 
           { 
               new Swimlane() 
               { 
                   ID = "swimlane1", 
                   Orientation = Orientation.Horizontal, 
                   Height = 200, 
                   Width = 450, 
                   Header = new SwimlaneHeader () 
                   { 
                       Annotation = new Annotation() 
                       { 
                           Content = "Header of swimlane" 
                       }, 
                       Style = new TextStyle() 
                       { 
                           Color = "red", 
                           FontSize = 14, 
                           FontWeight = "bold" 
                       }, 
                       Height = 30 
                   }, 
               } 
           }; 
       } 
    } 

    Methods

    Clone()

    Creates a new instance of the SwimlaneHeader class that is a copy of the current instance.

    Declaration
    public override object Clone()
    Returns
    Type Description
    System.Object

    A new SwimlaneHeader object that is a copy of this instance.

    Overrides
    SwimlaneChild.Clone()

    Implements

    IDiagramObject
    System.ICloneable
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved