0

I want to create following form but problem is there when I'm setting the margin with negative value then it will not work and hide my cross image. Is this possible to create as it is? or any other way to create this form.

My need: (in below image black area is transparent)

enter image description here

But now show my form like below image:-

enter image description here

Please let me know appropriate way.

4

1 回答 1

1

正如 Akku 在评论中所说,如果不使用 Adorner 或 Popups,您将无法在应用程序之外进行绘制。

但是你可以做的是,而不是使利润为负,而是使它们为正。这样您的内容(渐变背景)就有 10 或 20 的边距(或任何产生适当间距的数字。

<Window (.....) AllowsTransparency="True" WindowStyle="None">
    <Grid>
       <Button VerticalAlignment="Top" HorizontalAlignment="Right" Height="15" Width="15"/>
       <Border Margin="15">
            <YOUR_CONTENT>
       </Border>
    </Grid>
</Window>
于 2013-08-10T13:51:07.573 回答