Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fluent Theme: Expander is slow to collapse in .NET 9.0.1 #10295

Open
bent-rasmussen opened this issue Jan 16, 2025 · 5 comments
Open

Fluent Theme: Expander is slow to collapse in .NET 9.0.1 #10295

bent-rasmussen opened this issue Jan 16, 2025 · 5 comments
Assignees

Comments

@bent-rasmussen
Copy link

bent-rasmussen commented Jan 16, 2025

Description

My company is preparing a preview version of our app using the new fluent theme but we were surprised to find this regression in 9.0.1 (the slowness was introduced after upgrading from SDK 9.0.101 to SDK 9.0.102) - nothing else changed:

Image

Reproduction Steps

I have not been able to create a minimal repro yet.

Expected behavior

Fast collapse.

Actual behavior

Slow collapse.

Regression?

  • It was fast in SDK 9.0.101.
  • It is now slow in SDK 9.0.102.

Known Workarounds

Use prior version of .NET.

Impact

Poor UX.

Configuration

Microsoft Windows 11 Pro
Windows 10.0.26100 Build 26100
Surface Pro 8
.NET 9.0.1 (SDK 9.0.102)

Other information

No response

@dipeshmsft
Copy link
Member

@bent-rasmussen I will take a look at this, I pushed a fix in Expander as it was causing an issue during theme change, but I didn't face this issue.

@bent-rasmussen
Copy link
Author

Thanks. So far I can only say that we use a Frame/Page navigation setup, so that might be affecting the issue, I'm not sure.

@dipeshmsft
Copy link
Member

This shouln't be the issue as such as the whole WPF Gallery app is based on that setup, but I will take a look at it.

@Theo-bos
Copy link

Theo-bos commented Jan 21, 2025

I Found the Problem, thought I could share it here.
The Problem lies in the Expander Style, it happens only on Expander with Direction = Down.

<Style x:Key="DefaultExpanderStyle" TargetType="{Type Expander}">
<ControlTemplate.Triggers>

                      <MultiTrigger.Conditions>
                                <Condition Property="Expander.IsExpanded" Value="True"/>
                                <Condition Property="Expander.ExpandDirection" Value="Down"/>
                      </MultiTrigger.Conditions>

<TriggerBase.ExitActions>
This Keytime of 5 Seconds the produces this delay
<!--<DiscreteObjectKeyFrame KeyTime="0:0:5" Value="{x:Static Visibility.Collapsed}"/>-->
Should be like the other ExitActions
<DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Collapsed}"/>

@dipeshmsft
Copy link
Member

Thanks @Theo-bos for investigating the issue, if you would like to you can go ahead and raise a PR for this issue.
Meanwhile, @bent-rasmussen, I guess you can workaround it by creating a custom style from DefaultExpanderStyle and using it as the default to continue the development of your application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants