WPF Animations Cause Performance Issues for Excel Spell Check RRS feed

  • Question

  • Hello 

    I work at a company that develops multiple Office addins and we've recently discovered when an animation is active on a WPF control inside a task pane, the spell check window slows down. A customer brought this issue to our attention and are bothered by this slow down, because having our addin loaded is causing a slowdown to spell check. 

    How can we stop the performance impact WPF is having on Excel spell check? 

    I've constructed a test addin that demonstrates the behavior. The addin creates a task pane which is a winforms control with an ElementHost that hosts a WPF control. The WPF control has a small animation on loop. If you try and replace words using the built in spell check window when the task pane is visible, a noticeable pause will occur.

    Here's the code for the WPF control:

    <UserControl x:Class="TestWpfTaskPane.TestControl"
                 d:DesignHeight="450" d:DesignWidth="800">
                <Path Fill="Blue" Margin="15,15,15,15">
                        <EllipseGeometry x:Name="MyAnimatedEllipseGeometry" Center="10,100" RadiusX="15" RadiusY="15" />
                        <EventTrigger RoutedEvent="Path.Loaded">
                            <BeginStoryboard Name="MyBeginStoryboard">
                                    <PointAnimationUsingPath Storyboard.TargetName="MyAnimatedEllipseGeometry" Storyboard.TargetProperty="Center" Duration="0:0:5" RepeatBehavior="Forever" >
                                            <PathGeometry Figures="M 20,10 C 30,50 10,100 20,150" />

    System Information:

    Windows Version: 10.0.18363

    Excel Version: 11929.20606

    Test Addin .NET Framework Version: 4.7.2

    Microsoft.Office.Interop.Excel Version: 2.0.50727

    Thanks in advance for any help,


    Tuesday, February 25, 2020 10:05 PM