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.
}
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.
|
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:
|
|
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:
|
Hello.
Thanks for the patch. I now regard this issue as solved.
Best regards,
Torsten Schöning