我創建了一個消息框用戶控件,角落的半徑如下圖所示,但是,我無法爲此用戶控件設置透明。請幫幫我。如何在wpf中爲用戶控件設置透明
非常感謝。
更新:
我已經爲你的指令來實現,但它仍然不是透明的,我覺得這樣的背景下的用戶控件是白色,請幫助我。以下是我的代碼:
<UserControl x:Class="Nanote.TestDialog"
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"
d:DesignHeight="200"
Height="200" Width="450"
d:DesignWidth="300"
mc:Ignorable="d">
<Border CornerRadius="20" BorderBrush="Black" BorderThickness="10"
Background="Transparent">
<Rectangle Fill="White" Margin="10" />
</Border>
</UserControl>
請添加一些XAML你的問題,使得它更容易幫助。 – 2014-08-27 10:12:07
你在使用邊框嗎? – Pragmateek 2014-08-27 10:24:31
@Pragmateek:是的,請看我的代碼。 – admin 2014-08-28 02:11:21