dotnet / dotnet/dotnet-api-docs

The order that hook will be called is wrong in doc of HwndSource.AddHook(HwndSourceHook) Method

Open
#8,622 0 comments 0 reactions 0 assignees View on GitHub
area-WPF Pri3 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

**Issue description**

[HwndSource.AddHook(HwndSourceHook) Method ](https://learn.microsoft.com/en-us/dotnet/api/system.windows.interop.hwndsource.addhook?view=windowsdesktop-7.0) says "Hooks are called in the order that they were added.". But in my program, I found hooks are called in the reverse order that they were added. And I reconfirm it by reading [the source code of WPF](https://github.com/dotnet/wpf/blob/89d172db0b7a192de720c6cfba5e28a1e7d46123/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/InterOp/HwndSource.cs#L1639).
![image](https://user-images.githubusercontent.com/29969079/195508393-f4ff6ba0-7228-48e5-ad27-a217d2f02694.png)

**Target framework**

- [ ] .NET Core
- [x] .NET Framework
- [ ] .NET Standard

dotnet --info output or About VS info

```console

```

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.