Problems with WebBrowser in AccordionItem

Hello.
I have an SfAccordion control and the following code works as expected:

            accordionControl.Items.Clear();
            for (int i = 0; i < 2; i++) {
                accordionControl.Items.Add(new SfAccordionItem() {
                    Header = "Dummy",
                    Content = new TextBlock() {
                        Text = "Dummy Text

                    },

                    VerticalAlignment = VerticalAlignment.Stretch,
                    HorizontalAlignment = HorizontalAlignment.Stretch
                });
            }
I see two accordion items which I can open and close as I want.
Now instead of a TextBlock I want to use a WebBrowser control:

            accordionControl.Items.Clear();
            for (int i = 0; i < 2; i++) {
                accordionControl.Items.Add(new SfAccordionItem() {
                    Header = "Dummy",
                    Content = new WebBrowser(),
                    VerticalAlignment = VerticalAlignment.Stretch,
                    HorizontalAlignment = HorizontalAlignment.Stretch
                });
}

Now always two WebBrowser Controls are visible, despite the first accordion item is in collapsed state (see image). And I have found no way to change the height of the WebBrowser controls.

With best regards,
Torsten Schöning

P.S. As "Control" I could not choose "Accordion" and I was not able to create this as new incident becasue I could not enter values for at least "Project" and "Control" using Firefox.

            }Accordion with Controls.png


6 Replies

EM Elakkiya Muthukumarasamy Syncfusion Team November 23, 2021 01:42 PM UTC

Hi Torsten, 

Greetings from Syncfusion. 

Query1: I have found no way to change the height of the WebBrowser controls. 

We have checked your query and we suspect that you want to set the height of the WebBrowser controls. We can able to set the height for WebBrowser controls by using height property. Please refer the code example and sample for the same. 

Code example: 
 


Query 2: the first accordion item is in collapsed state 

We can reproduce the reported query and we are working to find the exact cause for this case. We will update the further details on 24th November 2021.We appreciate your patience until then. 

Query 3: "Control" I could not choose "Accordion" and I was not able to create this as new incident 

In Control filed you need to search like “SfAccordion” instead of “Accordion”. 

Please try it with the above solution and let us know if you need any further assistance on this. 

Regards, 
Elakkiya 



TS Torsten Schöning replied to Elakkiya Muthukumarasamy November 23, 2021 02:12 PM UTC

Ad Query 1: OK, setting the Height property directly works. I tried "VerticalAlignment = VerticalAlignment.Stretch" instead with the idea that the open accordion items fill the complete space of the parent control. But the webBrowser doesn't adapt its height according to its content and in general its probably better to calculate the desired heights of the web browser externally. So I regard this as solved.

Ad Query 2: OK, I will wait.

Ad Query 3. I will do this for the next incident.



TB Thirupathi Bala Krishnan Syncfusion Team November 24, 2021 12:46 PM UTC

 Hi Torsten, 
 
Thanks for the update. 
 
Please find our response as below, 
 
Query 
Solution 
OK, setting the Height property directly works  
Thanks for confirming that the solution provided resolved your reported scenario. 
 
the first accordion item is in collapsed state  
We recommend setting the SelectionMode to ZeroOrOne if you want to hide the first accordion item. Meanwhile, we encountered the error when using the WebBrowser as the SfAccordionItem's content. 
 
For more details, please refer our UG documentation from the following link: 
 
 
We have confirmed the reported scenario is a defect and logged a report for the reported scenario “When using WebBrowser as content, the collapsed accordion item did not display as expected”. We’ll provide the patch for the reported issue on 3rd December 2021.  
 
You can track the status of this defect using the following feedback link:        
 
If you have any more specification replication procedure or a scenario to be tested you can add it as a comment in the portal.     
 
Please let us know if you need any further assistance. 
 
Regards, 
Thirupathi B. 



TB Thirupathi Bala Krishnan Syncfusion Team December 1, 2021 01:22 PM UTC

Hi Torsten,  

Thanks for your patience.  
 
   
We have fixed the reported issue - “When using WebBrowser as content, the collapsed accordion item did not display as expected”. As previously stated, you need to set the SelectionMode to ZeroOrOne if you want to hide the first accordion item. Please find the screenshot for your reference. 
 
 
 
 
Please find the patch file from the following location:      

V19.3.0.53
 
Recommended approach – exe will perform automatic configuration                   
Please find the patch setup here:                                         
                     
Advanced approach – use only if you have specific needs and can directly replace existing assemblies for your build environment                                    
Please find the patch assemblies alone from:                    
                 
Please find the Nugets from the below location:                   
                  
               
NOTE:         
You can change how you receive bug fixes by navigating to the following link and updating your preferences.        
                 
Disclaimer:                                  
Please note that we have created this patch for the version 19.3.0.53 specifically to resolve the issues reported in this forum #170649. If you have received other patches for the same version for other products. This fix will be included in our Volume 4 release which will be available in December 2021.     
   
Please let us know if you need any further assistance.   
   
Regards,
Thirupathi B.
 





TS Torsten Schöning December 3, 2021 08:14 AM UTC

Hello.
Thanks for the patch. I now regard this issue as solved.
Best regards,
Torsten Schöning



TB Thirupathi Bala Krishnan Syncfusion Team December 3, 2021 08:39 AM UTC

Hi Torsten,

Thanks for confirming that the provided patch resolved your reported issue at your end. Please let us know if you need any further assistance on this. As always, we are happy to assist you.

Regards,
Thirupathi B. 


Loader.
Up arrow icon