我有带圆角圆角网格角匹配窗口圆角
<Window x:Name="windowPortal" x:Class="ICS2GO.PortalWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Portal" Height="301" Width="489" Icon="/Resources/icon.ico"
WindowStyle="None" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Closing="Window_Closing" Background="Transparent" AllowsTransparency="True">
<Border Name="windowBorder" BorderThickness="2" BorderBrush="DarkBlue"
CornerRadius="20" Background="LightBlue" Margin="0,0,0,0">
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
//main controls, buttons, images ...etc here
<Grid x:Name="gdWait" >
<Grid Background="Black" Opacity="0.5"/>
<Label x:Name="lblStatus" Content="Please Wait"
HorizontalAlignment="Center" HorizontalContentAlignment="Center"
VerticalContentAlignment="Center" VerticalAlignment="Center"
FontWeight="Bold" Foreground="Red" FontSize="24" Margin="28,51,28,62"
Height="72" Width="410"/>
<ProgressBar x:Name="pbWaiting" HorizontalAlignment="Left" Height="30"
Margin="110,108,0,0" VerticalAlignment="Top" Width="243"
IsIndeterminate="True" Orientation="Horizontal"/>
</Grid>
</Grid>
网格X WPF窗口:名称=“gbWait”被显示在所有主控制与黑色背景和不透明度设置为允许一些主要控件的可粘性,但总是让它们不可点击的用户
我想使网格gbWait的圆角也是圆形的,所以它与窗口的圆角相匹配。目前他们是正方形的,并延伸到正常方形的窗户角落。
这正是我所需要的。非常感谢。 – Tsukasa