SfAccordion not barely updated beside WindowsFormsHost
Hi,
we currently want to integrate a 3rd-party render engine into our WPF application. This is done via an WindowsFormsHost, which implements a custom user control to start the application, render our content, e.g. The WindowsFormsHost runs as fast as possible so the rendering is updated as frequent as possible as well.
We now face an issue, when we work with SfAccordion in the the same ChromelessWindow. For testing purposes I eliminated all unneccessary stuff, so that our WindowsFormsHost is rendered in the first grid column, the SfAccordion in the second column.
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid Grid.Column="0">
<WindowsFormsHost Visibility="{Binding RunNotInDesignMode}">
<windowControl:EngineControl x:Name="EngineApp"/>
</WindowsFormsHost>
</Grid>
<syncfusion:SfAccordion Grid.Column="1" MinWidth="400">
<syncfusion:SfAccordionItem Header="Topic 1">
<StackPanel Orientation="Vertical">
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
</StackPanel>
</syncfusion:SfAccordionItem>
<syncfusion:SfAccordionItem Header="Topic 2">
<StackPanel Orientation="Vertical">
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
<Label>Hello World</Label>
</StackPanel>
</syncfusion:SfAccordionItem>
</syncfusion:SfAccordion>
</Grid>
The issue is, that expanding/collapsing the SfAccordion is not done, when the user didn't hover over another syncfusion-item or another SfAccordionItem-Header. It doesn't matter, whether SfAccordion has two or fifteen items. While disabling the WindowsFormsHost, everything seems to work normally. Also WPF performance analyzer brings nothing special, beside WindowsFormsHost using all the rendering capacities (which is needed).
The issue does only happen on SfAccordion, the MenuBar e.g. doesn't seem to have this issue. For a better understanding, I attached a link to an video.
https://hidrive.ionos.com/lnk/5wMAinbi#file
Thanks in advance!
Hi Christian,
We were uable to reporduce the reported scenario based on the given information. Please refer to the attached sample.
Could you please share the information about the WindowsFormsHost and if you can, please provide a modified sample with the WindowsFormsHost installed so that we can analyze the issue better and provide a solution?
Regards,
Bhaskar Suresh
Attachment: SfAccordion_WPF_e3a07a5e.zip
Hi Bhaskar,
yes, we can for sure provide you an modified sample. Is it okay to provide you the attachment link via an PN
Hi Christian,
If you can able to share the sample as you have shared a demo video via an link, please share in that way.
Regards,
Bhaskar Suresh
Hi Bashkar,
we found the root cause of the issue that doesn't have anything to do with syncfusion. So sorry for any inconvenience.
The render engine (or specifically WPF) will block the Dispatcher indefinetly when the embedded User control calls Invalidate() to often. In our case, the OnPaint()-method runs as fast as possible (which is good), while the Invalidate() seems to re-arrange the Dispatcher jobs in an inproper way (which is bad).
We solved our issue by using a new thread that runs the OnPaint-method within an Application.Current.Dispatcher.Invoke()-command, but delay that task for one millisecond afterwards.
Thanks again
Christian
Hi Christian,
We are glad that your reported issue has been solved. Hence, we are closing this thread.
Please let us know if you need any other assistance. We are happy to assist you.
Regards,
Bhaskar Suresh
- 5 Replies
- 2 Participants
-
CH Christian
- Feb 9, 2024 10:45 AM UTC
- Feb 27, 2024 05:15 PM UTC