ComponentOne FlexPivot for WinForms
C1.Win.C1FlexGrid.4.8 Assembly / C1.Win.C1FlexGrid Namespace / CellStyle Class / BuildString Method / BuildString(StyleElementFlags) Method
StyleElementFlags that specifies which style elements should be included in the string.
Example

In This Topic
    BuildString(StyleElementFlags) Method
    In This Topic
    Returns a string representation of this CellStyle.
    Syntax
    'Declaration
     
    Public Overloads Function BuildString( _
       ByVal elements As StyleElementFlags _
    ) As String
    public string BuildString( 
       StyleElementFlags elements
    )

    Parameters

    elements
    StyleElementFlags that specifies which style elements should be included in the string.

    Return Value

    A string containing the settings of the specified style elements.
    Remarks

    This method is used to persist grid styles and can be used to define and save 'skins'.

    See the CellStyleCollection.BuildString and CellStyleCollection.ParseString methods.

    Example
    The code below shows the effect of specifying different values for the elements parameter. It builds one compact string containing only the elements actually defined in a style, and another including all style elements.
    // build compact and a long style definition strings
    string s1 = _flex.Styles.Fixed.BuildString();
    string s2 = _flex.Styles.Fixed.BuildString(StyleElementFlags.All);
                
    // show both style definitions
    Console.WriteLine("{0}: {1}", s1.Length, s1);
    Console.WriteLine("{0}: {1}", s2.Length, s2);
    See Also