dotnet / dotnet/wpf

After user click the Expander header, IsExpanded not work by trigger.

Open
#4,362 15 comments 0 reactions 0 assignees View on GitHub
Feature Request
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

* .NET Core Version:
```
.NET SDK (反映任何 global.json):
Version: 5.0.201
Commit: a09bd5c86c

运行时环境:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.201\

Host (useful for support):
Version: 5.0.4
Commit: f27d337295

.NET SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
5.0.201 [C:\Program Files\dotnet\sdk]
```
* Windows version: `Win10 20H2`
* Does the bug reproduce also in WPF for .NET Framework 4.8?: I don't know.
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions [here](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019).
* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/master/README.md#reporting-security-issues-and-security-bugs).



**Problem description:**
I want to expand the `Expander` when the `TextBox` has validation error. But after I click the `Expander` header by mouse once, the `IsExpanded` property never works.

![image](https://user-images.githubusercontent.com/4510984/113347725-2ca7ac00-9368-11eb-8aac-5daa2a00814e.png)

Let's see, its background is changed, so the trigger is no problem.

![image](https://user-images.githubusercontent.com/4510984/113347818-4c3ed480-9368-11eb-97c7-56b7d564ee5d.png)

**Actual behavior:**
After user click the `Expander` header, `Expander.IsExpanded` no longer expand the content.

**Expected behavior:**
After user click the `Expander` header, `Expander.IsExpanded` should expand the content when it is `True`.

**Minimal repro:**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.