Hi,@Vincent li . Welcome. Microsoft Q&A.
According to my testing IsHitTestVisible=false
works. You could try to refer to the code below.
MainWindow.xaml:
<Window x:Class="ImageClickThrough.MainWindow"
....
mc:Ignorable="d" ShowInTaskbar="True"
BorderBrush="Gray" Background="{x:Null}"
AllowsTransparency="True"
WindowStyle="None"
Title="MainWindow" Height="450" Width="800">
<Grid>
<TextBlock Text="hello" Foreground="Red" FontSize="20" Height="24" Width="54" PreviewMouseDown="TextBlock_PreviewMouseDown" />
<Border>
<Image Width="24" Height="24" Source="37.jpg" IsHitTestVisible="False" MouseLeftButtonDown="Image_MouseDown" />
</Border>
</Grid>
</Window>
MainWindow.xaml.cs:
275740-clickwindowthrough.txt
The result:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.