Image控件设置边框
<Image Source="./logo.jpg" Width="30" Height="30" Margin="20 0 10 0" VerticalAlignment="Center">
<Image.Clip>
<EllipseGeometry RadiusX="15" RadiusY="15" Center="15,15"/>
</Image.Clip>
</Image>
TextBox控件设置未取得焦点时候的默认文案
<TextBox Width="300" Grid.Column="1" Name="inputText">
<TextBox.Resources>
<VisualBrush x:Key="hinttext" TileMode="None" AlignmentX="Left" Stretch="None">
<VisualBrush.Visual>
<TextBlock FontStyle="Normal" Foreground="#76CBD2" Text="Search for what you like"/>
</VisualBrush.Visual>
</VisualBrush>
</TextBox.Resources>
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Style.Triggers>
<Trigger Property="Text" Value="">
<Setter Property="Background" Value="{StaticResource hinttext}"/>
</Trigger>
<Trigger Property="Text" Value="{x:Null}">
<Setter Property="Background" Value="{StaticResource hinttext}"/>
</Trigger>
</Style.Triggers>
</Style>
</TextBox.Style>
</TextBox>
Border控件绘制一个阴影
<Border CornerRadius="5" Background="White" Margin="0" Height="50">
<Border.Effect>
<DropShadowEffect Color="Red" ShadowDepth="10" BlurRadius="10" Opacity="0.1" Direction="270"/>
</Border.Effect>
</Border>