ComponentOne Gallery for ASP.NET Web Forms
Task-Based Help / Automatically Playing the Gallery Items
In This Topic
    Automatically Playing the Gallery Items
    In This Topic

    If you choose you can automatically play items in the Gallery as a slideshow. When AutoPlay is set to True the C1Gallery will automatically cycle through content items. When ShowTimer is True a progress bar will be displayed with a Play/Pause button to let users start and stop the slideshow at run time.

    In the examples below you'll add autoplaying and a timer to the Gallery.

    In Source View

    In Source view add AutoPlay="True" ShowTimer="True" to the <cc1:C1Gallery> tag so it appears similar to the following:

    <cc1:C1Gallery ID="C1Gallery1" runat="server" AutoPlay="True" ShowTimer="True">
    

    At Design Time

    In Design view, select the C1Gallery control and in the Properties window set the following:

    In Code

    Add the following code to the Page_Load event:

    To write code in Visual Basic

    Visual Basic
    Copy Code
    Me.C1Gallery1.AutoPlay = True
    
    Me.C1Gallery1.ShowTimer = True

    To write code in C#

    C#
    Copy Code
    this.C1Gallery1.AutoPlay = true;
    
    this.C1Gallery1.ShowTimer = true;
    See Also