< Window x:Class ="ZabrRssReader.Forms.Windows.ViewFeedItem"
xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
Width ="310" Height ="260" WindowStyle ="None" Background ="Transparent"
AllowsTransparency ="True" WindowStartupLocation ="CenterOwner" >
< Border BorderThickness ="3,5,3,5" CornerRadius ="20,20,20,20" Padding ="10" >
< Border.BorderBrush >
< LinearGradientBrush StartPoint ="0,0" EndPoint ="0,1" >
< GradientStop Color ="#FFAAAAAA" Offset ="0" ></ GradientStop >
< GradientStop Color ="#FFAAAAAA" Offset ="1" ></ GradientStop >
</ LinearGradientBrush >
</ Border.BorderBrush >
< Border.Background >
< LinearGradientBrush StartPoint ="0,0" EndPoint ="0,1" >
< GradientStop Color ="#615B5D" Offset ="0" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.2" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.3" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.2" ></ GradientStop >
< GradientStop Color ="#000000" Offset ="1" ></ GradientStop >
</ LinearGradientBrush >
</ Border.Background >
< TextBlock TextAlignment ="Center" VerticalAlignment ="Center" >
Hello World!
</ TextBlock >
</ Border >
</ Window >
< Window x:Class ="ZabrRssReader.Forms.Windows.ViewFeedItem"
xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml"
Width ="310" Height ="260" WindowStyle ="None" Background ="Transparent"
AllowsTransparency ="True" WindowStartupLocation ="CenterOwner" >
< Border BorderThickness ="3,5,3,5" CornerRadius ="20,20,20,20" Padding ="10" >
< Border.BorderBrush >
< LinearGradientBrush StartPoint ="0,0" EndPoint ="0,1" >
< GradientStop Color ="#FFAAAAAA" Offset ="0" ></ GradientStop >
< GradientStop Color ="#FFAAAAAA" Offset ="1" ></ GradientStop >
</ LinearGradientBrush >
</ Border.BorderBrush >
< Border.Background >
< LinearGradientBrush StartPoint ="0,0" EndPoint ="0,1" >
< GradientStop Color ="#615B5D" Offset ="0" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.2" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.3" ></ GradientStop >
< GradientStop Color ="#615B5D" Offset ="0.2" ></ GradientStop >
< GradientStop Color ="#000000" Offset ="1" ></ GradientStop >
</ LinearGradientBrush >
</ Border.Background >
< TextBlock TextAlignment ="Center" VerticalAlignment ="Center" >
Hello World!
</ TextBlock >
</ Border >
</ Window >
< Border BorderThickness = "3,5,3,5" CornerRadius = "20,20,20,20" Padding = "10" >
// Makes Window Moving
private void Window_MouseDown ( object sender, MouseButtonEventArgs e)
{
if (e.LeftButton == MouseButtonState.Pressed) DragMove ();
}
Source: https://habr.com/ru/post/40489/
All Articles