Click here to Skip to main content
12,750,191 members (36,732 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: .NETCF
I am using slideUI controls in my project . There is a spinner control which is used as wait cursor. I want to display the spinner when I load data in a List. But when I try to display the spinner it visualize as an image not a rotating image.

Below is my code.

private void uiButton_Click(object sender, EventArgs e)
    {
        ShowFrame(this.uiPanel1);

        Application.DoEvents();

        LoadList();

        HideFrame(uiPanel1);

    }

    private void LoadList()
    {
        try
        {
            //Call the BeginAddControls before starting manipulations with UIList 
            uiList1.BeginAddControls();

            for (int i = 0; i < 100; i++)
            {
                UIListItem item = new UIListItem();
                item.Text = "Primary Text" + i;
                item.SecondaryText = "This is secondary text..";
                item.ItemStyle = UIListItemStyle.SingleText;
                item.Height = Utils.CalcScaleSize(38);
                item.BackColor = System.Drawing.SystemColors.Window;
                item.BackEndColorSelected = System.Drawing.SystemColors.Highlight;
                item.BackStartColorSelected = System.Drawing.SystemColors.Highlight;
                item.BottomBorderColor = System.Drawing.Color.Gainsboro;
                item.Buffering = true;
                item.ColorScheme = SlideUI.UIColorSchemesCustom.Orange;
                item.Dock = System.Windows.Forms.DockStyle.Top;
                item.GroupArrowColor = System.Drawing.Color.Gray;
                item.GroupArrowColorSelected = System.Drawing.Color.White;
                item.IconQVGA = null;
                item.IconSize = new System.Drawing.Size(25, 31);
                item.IconTransparent = false;
                item.IconTransparentColor = System.Drawing.Color.Transparent;
                item.IconVGA = null;
                item.IconVisible = true;
                item.InheritParentSettings = true;
                item.IsGroup = false;
                item.IsSelected = false;
                item.SecondaryTextColor = System.Drawing.SystemColors.GrayText;
                item.SecondaryTextColorSelected = System.Drawing.SystemColors.HighlightText;
                item.SecondaryTextFont = new System.Drawing.Font("Tahoma", 8F, System.Drawing.FontStyle.Regular);
                item.TextColor = System.Drawing.SystemColors.WindowText;
                item.TextColorSelected = System.Drawing.SystemColors.HighlightText;
                item.TextFont = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Bold);
                item.UseGradient = true;
                item.VirtualBufferRendered = false;

                uiList1.AddControl(item);
            }

            //Call of EndAddControls method when the UIListItems binding is done  
            uiList1.EndAddControls();
            //HideFrame(uiPanel1);
            //ShowFrame(this.panel1, "Panel1");
        }
        catch (Exception ex)
        {
            UIMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK,
                   UIMessageIcons.Done, UIColorSchemesCustom.Orange);
        }
    }

    private void ShowFrame(Panel panel)
    {
        Panel pnlPanel = new Panel();
        pnlPanel = panel;
        //pnlPanel.Location = new System.Drawing.Point(0, 0);
        pnlPanel.Show();
        pnlPanel.BringToFront();
    }


    private void HideFrame(Panel panel)
    {
        Panel pnlPanel = new Panel();
        pnlPanel = panel;
        pnlPanel.Hide();
    }

Thanks in advance
Posted 15-Nov-12 0:28am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.170215.1 | Last Updated 15 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100