嗨我想要圆角的图像或者重叠我的边界ontop图像,但任何即时尝试似乎并没有工作。网格和图像重叠边框?
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
WindowStyle="None"
ResizeMode="NoResize"
AllowsTransparency="True"
WindowStartupLocation="CenterScreen"
BorderThickness="0,0,0,0"
Background="Transparent"
Title="MainWindow" Loaded="Window_Loaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="581" d:DesignWidth="733" SizeToContent="WidthAndHeight">
<Border BorderThickness="6" BorderBrush="Black" CornerRadius="12" Padding="0.5"
HorizontalAlignment="Center" VerticalAlignment="Center">
<Grid>
<Image Height="543" HorizontalAlignment="Left" Name="image1" Stretch="Fill" VerticalAlignment="Top" Width="711" Source="/WpfApplication1;component/Images/Login.jpg" ImageFailed="image1_ImageFailed" />
<TextBox Height="38" HorizontalAlignment="Left" Margin="205,177,0,0" Name="textBox1" VerticalAlignment="Top" Width="299" Background="#00000000" BorderBrush="#00000000" BorderThickness="0" Text="Please enter your email address." FontSize="18" Foreground="White" TextChanged="textBox1_TextChanged" />
<TextBox Background="#00000000" BorderBrush="#00000000" BorderThickness="0" FontSize="18" Foreground="White" Height="38" HorizontalAlignment="Left" Margin="205,256,0,0" Name="textBox2" Text="Please enter your password" VerticalAlignment="Top" Width="299" />
</Grid>
</Border>
</Window>
是否可以在网格上重叠边框?
你可以看到我从这个屏幕转储的意思是:
我得到的错误在类型“图像”中找不到可附加属性“Clip” – 2012-03-22 12:38:37
@Garrith检查我的编辑。确保您已将Clip标签放置在正确的位置。 – 2012-03-22 14:57:30
@down voter:很高兴知道我的答案为什么被低估。即使是简短的评论也会有所帮助。 – 2012-03-22 15:22:40