Skip to content

Poor performance following ShadowAssist.CacheMode change #3616 #3840

Open

Description

@yosefmah

Bug explanation

It seems that specifically following commit #3616 to change the default ShadowAssist CacheMode behaviour, I find the performance of our WPF app to be a lot slower and laggy than it was before, particularly when it comes to animations such as those in the DialogHost flyouts. It's particularly bad after resizing the window or in full screen.

I'm trying to figure out the best way to replicate the old behaviour. I've tried to set a CacheMode with EnableClearType and SnapsToDevicePixels but it seems like I have to set this all the way down and just setting it on the window or main containing control doesn't work.

Would appreciate any guidance on this. Has anyone else had a similar problem or know the best way to handle the CacheMode property globally? Is that even the right approach or should it only be set for troublesome controls?

Version

5.2.1

Activity

  1. added
    evaluation required
    on Apr 30, 2025
  2. JSparshottO2 commented on May 7, 2025

    @JSparshottO2

    Further to this. And seemingly specifically to do with the Cards, their performance is far worse after this change. We have added the following to our style that targets the MaterialWindow to allow the AttachedProperties Inherits to trickle down

    <Setter Property="md:ShadowAssist.CacheMode">
        <Setter.Value>
            <BitmapCache EnableClearType="True"
                         SnapsToDevicePixels="True" />
        </Setter.Value>
    </Setter>

    This seems to have fixed numerous issues, except for the Cards, which continue to perform poorly after this commit (for some reason).
    Adding this to the cards then returns their performance to pre-commit levels:

    <md:Card.CacheMode>
        <BitmapCache 
            EnableClearType="True"
            SnapsToDevicePixels="True" />
    </md:Card.CacheMode>
  3. added this to the 5.3.0 milestone on May 30, 2025
  4. removed
    evaluation required
    on May 30, 2025
  5. modified the milestones: 5.3.0, 5.3.1 on Oct 6, 2025
  6. modified the milestones: 5.3.1, 5.3.2 on Mar 30, 2026
  7. modified the milestones: 5.3.2, 5.4.0 on May 1, 2026
  8. removed this from the 5.4.0 milestone on Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions