Design changing color - ScrollerFrame

Hello,


I'm using scrollerframe, but I have a design problem. When I load the listView that is AttachedTo I see it first White and later the color i have chosen.

I made a gif to make it easier understand it.


What shall I do to don't let this happend?


Thanks in advance.





15 Replies

SN Sindhu Nagarajan Syncfusion Team May 10, 2018 12:48 PM UTC

Hi Josep, 

Thanks for contacting Syncfusion support. 

We have created a sample with ListView and ScrollerFrame is attached to it. Please let us know the use case of your scenario that you are trying to change the theme applied to the ScrollerFrame or changing the data to the ListView. Please refer to the attached sample and let us know if we missed any customization or if possible please modify it so as to reproduce the issue. It would be easier for us to provide the solution at earliest. 


Regards, 
Sindhu  



JL Josep Llobet Gonzalez May 10, 2018 01:14 PM UTC

Hello,

First, thank you for replying so fast.

The sample you sent it's happening exacly what is happening to me. When you load many times the content of the listView, the scroll style is changing and getting back again.

Steps I do are :

1) I change the style to office2016 once.

2) Load content of the listView

Step 1 only once.


SN Sindhu Nagarajan Syncfusion Team May 11, 2018 12:44 PM UTC

Hi Josep, 

Thanks for your update. 

By default, ScrollerFrame is overlapping on the control’s default scrollbar (system scrollbar), not replaced that default one. So that default scrollbar is shown (updating default scrollbars) for a while at the time of updating listview items. In order to resolve the issue, we would suggest you to use the BeginUpdate() and EndUpdate() methods of ListView to restrict the default scroll bar to update for each items. Please refer to the below code and sample, 

Code Example 
private void button1_Click(object sender, EventArgs e) 
{           
    listView1.Items.Clear(); 
    listView1.BeginUpdate(); 
    for (int i = 0; i < 100; i++) 
    { 
        listView1.Items.Add("First" + i); 
    } 
    listView1.EndUpdate(); 
} 
 
Sample Link: ScrollerFrame 
 
Please let us know if you have any other queries. 

Regards, 
Sindhu  



JL Josep Llobet Gonzalez May 14, 2018 07:13 AM UTC

Hello,

Thanks for replying so fast. It's working with the solution you gave me.

Very grateful.


SN Sindhu Nagarajan Syncfusion Team May 15, 2018 04:58 AM UTC

Hi Josep, 

Thanks for the update. 
We are glad to hear that the provided solution resolved your scenario. Please let us know if you have any other queries. 

Regards, 
Sindhu  



JL Josep Llobet Gonzalez June 28, 2018 01:28 PM UTC

Hello again,

I'm having the same problem now, but this time with a control Panel. How I should update it?

Thanks in advance.


SN Sindhu Nagarajan Syncfusion Team June 29, 2018 01:27 PM UTC

Hi Josep, 

Thanks for the update. 

We are little unclear about your exact scenario. We need some more details to analyze the reported issue. In your update you mentioned as ControlPanel. Please let us know about the panel whether you are using MSDN panel in your project. If possible please provide the code customization that you have done in your project. It would be helpful for us to provide solution for the issue at the earliest.  


Regards, 
Sindhu  



JL Josep Llobet Gonzalez September 4, 2018 04:08 PM UTC

Hello,

I can't send you the code. Is the same problem I had with ListView but this time with a Panel Control, but the control doesn't let me do "listView1.BeginUpdate(); ". The solution you gived me..

Thanks in advance!


MG Mohanraj Gunasekaran Syncfusion Team September 5, 2018 02:07 PM UTC

 
Thanks for your update. 
 
We have tried to reproduce your scenario using below sample but the attached sample is working fine as we expected.  
 
Tried code 
 
this.panel1.Controls.Add(this.listView1); 
scrollersFrame1.AttachedTo = listView1; 
 
private void button1_Click(object sender, EventArgs e) 
{           
    listView1.Items.Clear(); 
    listView1.BeginUpdate(); 
    for (int i = 0; i < 100; i++) 
    { 
        listView1.Items.Add("First" + i); 
    } 
    listView1.EndUpdate();                        
} 
 
 
So, Please let us the below attached sample differ from your customization. if it is possible, please modify the below attached sample to reproduce the reported scenario. It will be helpful us to assist you. 
 
 
Regards,
Mohanraj G
 



JL Josep Llobet Gonzalez September 5, 2018 03:34 PM UTC

Hello,

Sorry, I didn't explit it well. I don't have a ListView inside the Panel, I have diferent UserControl.

I attach a GIF, when I do the click, all usercontrols are loaded inside the panel and it shows the "bug" between standard scroll and yours.

Thanks in advance


AA Arulraj A Syncfusion Team September 6, 2018 11:32 AM UTC

Hi Josep, 

We have tried with user control as per your provided details and we have faced the previously reported issue but which will be resolved by using the BeginUpdate method before that clearing the items. Please refer the following code example, 

Code example 
listView1.BeginUpdate(); 
listView1.Items.Clear(); 
for (int i = 0; i < 100; i++) 
{ 
    listView1.Items.Add("Second" + i); 
} 
listView1.EndUpdate(); 

Please refer the below tested sample, 

If you are facing different issue, please provide the some more details about the issue which you have faced. It will be helpful us to assist you. 
  
Arulraj A 



JL Josep Llobet Gonzalez September 6, 2018 11:40 AM UTC

Hello,

I can't not use that because I don't have a ListView so i can not use "BeginUpdate". I have a Panel and inside the Panel I load the different UserControls.



Thanks in advance.


AA Arulraj A Syncfusion Team September 7, 2018 10:19 AM UTC

 
Thanks for your update. 
 
To avoid the flickering for ScrollersFrame when add the new user controls in panel, you could use the SuspendLayout and ResumeLayout method. Please refer the following code example and the sample, 
 
Code example 
this.panel2.SuspendLayout(); 
this.panel2.Controls.Clear(); 
height = 0; 
for (int i = 0; i < 3; i++) 
{ 
    UserControl1 con = new UserControl1(); 
    con.Location = new Point(location.X, location.Y + height); 
    this.panel2.Controls.Add(con); 
    height = con.Height; 
} 
this.panel2.ResumeLayout(true); 
 
 
Regards, 
Arulraj A 



JL Josep Llobet Gonzalez September 7, 2018 10:58 AM UTC

Hello,

Thanks for answering.

I'm trying "pnl.SuspendLayout" and "pnl.ResumeLayout" but still flickering. Do We can get another idea?

Thanks in advance.


MG Mohanraj Gunasekaran Syncfusion Team September 10, 2018 12:51 PM UTC

Hi Josep, 
 
Thanks for your update. 
  
We have analyzed your query “ScrollerFrame flickering when remove and add the user controls”. We are unable to reproduce the reported scenario. So, we have created a separate incident to track the status of this query. 

Please log on to our support website to check for further updates.

http://www.syncfusion.com/Account/Logon?ReturnUrl=%2fsupport%2fdirecttrac/  
 
 
Regards, 
Mohanraj G 


Loader.
Up arrow icon