嗨我想要圓角的圖像或者重疊我的邊界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