[英]How do I round out the corners of my grid and remove the background?
我試圖將頂部的角修圓,並除去切出的部分,因此折彎外部的外部部分不在內部。 到目前為止,這就是我要彎曲的網格而不是
但我不確定如何“裁掉”
<Window x:Class="Ah.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Ah"
mc:Ignorable="d"
WindowStyle="None" AllowsTransparency="True" Background="Transparent" ResizeMode="NoResize" Height="550" Width="1000">
<Grid Background="White">
<Border BorderBrush="Red" BorderThickness="2" CornerRadius="50,50,0,0">
</Border>
</Grid>
</Window>
修復。 我決定使MainWindow透明,然后創建兩個網格,一個在頂部帶有彎曲的網格,另一個在其下方,該網格將容納所有控件,因此現在看起來像這樣
享受做同樣事情的人
<Grid Background="Transparent">
<Border BorderBrush="Black" Background="Black" BorderThickness="2" VerticalAlignment="Top" Height="30" CornerRadius="5,5,0,0">
</Border>
<Grid Background="White" Height="520" VerticalAlignment="Bottom"></Grid>
</Grid>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.