Created
January 14, 2016 14:20
-
-
Save treytomes/3ba8931224365c585068 to your computer and use it in GitHub Desktop.
WPF UserControl with a nice looking title line.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<UserControl x:Class="OS.NET.Widgets.Window" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Height="300" Width="300"> | |
<Grid> | |
<Grid.RowDefinitions> | |
<RowDefinition Height="24" /> | |
<RowDefinition /> | |
</Grid.RowDefinitions> | |
<Border Grid.Row="0" Grid.Column="0" BorderBrush="Black" CornerRadius="4,4,0,0"> | |
<Border.Background> | |
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> | |
<GradientStop Color="LightGreen" Offset="0" /> | |
<GradientStop Color="DarkGreen" Offset="1" /> | |
</LinearGradientBrush> | |
</Border.Background> | |
<Grid> | |
<TextBlock Margin="4" VerticalAlignment="Center" Foreground="White" Text="Window Title"> | |
<TextBlock.BitmapEffect> | |
<DropShadowBitmapEffect Color="Black" /> | |
</TextBlock.BitmapEffect> | |
</TextBlock> | |
</Grid> | |
</Border> | |
<ContentPresenter /> | |
</Grid> | |
</UserControl> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment