ウィンドウ内に動的に描画する四角形があります。このウィンドウには、不透明度が0.4に設定された背景があります。 私は矩形内の領域を完全に透明にしたいと思っています(ウィンドウの背景を見てください)。矩形を完全に透明にしました(ウィンドウ内の穴)WPF
これを行う方法はありますか?
<Window x:Class="TakeAScreenzone"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="PloofTAS" Height="355" Width="539" Topmost="True"
ResizeMode="NoResize" AllowsTransparency="True"
ShowInTaskbar="False" ShowActivated="True" WindowStyle="None" Background="#66FFFFFF" >
<Grid Name="Grid1"></Grid>
</Window>
そして、ここで私は私の四角形を描画するために使用するコード(GRID1は私の窓のメイングリッドである。)::
WorkingRectangle = New Rectangle
WorkingRectangle.Stroke = New SolidColorBrush(Colors.Red)
WorkingRectangle.StrokeThickness = 1
WorkingRectangle.Fill = Nothing
WorkingRectangle.HorizontalAlignment = Windows.HorizontalAlignment.Left
WorkingRectangle.VerticalAlignment = Windows.VerticalAlignment.Top
Grid1.Children.Add(WorkingRectangle)
ウィンドウには、40%の不透明度である、または矩形はありますか? –
ウィンドウの背景色。私はウィンドウ内のスナップショットツールと同じレンダリングをしようとしています。 –
清算に感謝します –