I'm creating WPF application which has grip region and semi-transparent mouse pass-through region like below.
+----+---------------------------+
|Grip| |
+----+ |
| Semi-transparent region with |
| mouse pass-through |
+--------------------------------+
XAML:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
WindowStyle="None" Background="Transparent" AllowsTransparency="True" Topmost="True" >
<Grid>
<!-- I want to make this contents pass-through -->
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
<GradientStop Color="#7F000000" Offset="0"/>
<GradientStop Color="#00000000" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Label Content="Semi-transparency mouse pass-through region"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<!-- except this -->
<Rectangle Name="grip"
Width="50" Height="50"
Fill="#7F000000"
VerticalAlignment="Top"
HorizontalAlignment="Left" />
</Grid>
</Window>
According to this question, I tried setting the WS_EX_TRANSPARENT
for my window, but this method unable me to handle window messages to move or resize the window.
So, my question is, is there any way to make the window described above using WPF?
Edit: I want to make my window like this except grip.