You can try like this. This code will give you rectangular border to stroke.
<window x:class="WpfApplication3.MainWindow" xmlns:x="#unknown">
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" AllowsTransparency="True" WindowStyle="None"
Title="MainWindow" Height="406" Width="1076" Loaded="Window_Loaded" Background="Transparent" BorderBrush="White">
<canvas height="346" width="1032" opacity="0.8">
<border borderbrush="Black" borderthickness="1" horizontalalignment="Center" verticalalignment="Center"></border>
<!--Non-Rectangular window edge, created with PathGeometry-->
<path stroke="DarkGray" strokethickness="2" height="346" width="1032" opacity="0.9">
<path.fill>
<lineargradientbrush startpoint=".2,0" endpoint="0.8,1">
<gradientstop color="Lightgray" offset="0"></gradientstop>
<gradientstop color="PaleGoldenrod" offset="1.0"></gradientstop>
<gradientstop color="AliceBlue" offset="0.4"></gradientstop>
<gradientstop color="LightGoldenrodYellow" offset="0.5"></gradientstop>
</lineargradientbrush>
</path.fill>
<path.data>
<pathgeometry>
<pathfigure startpoint="40,20" isclosed="True">
<linesegment point="990,20"></linesegment>
<arcsegment point="1020,50" size="40,55" sweepdirection="Clockwise"></arcsegment>
<linesegment point="1020,300"></linesegment>
<arcsegment point="990,330" size="40,55" sweepdirection="Clockwise"></arcsegment>
<linesegment point="40,330"></linesegment>
<arcsegment point="10,290" size="40,55" sweepdirection="Clockwise"></arcsegment>
<linesegment point="10,45"></linesegment>
<arcsegment point="40,20" size="40,55" sweepdirection="Clockwise"></arcsegment>
</pathfigure>
</pathgeometry>
</path.data>
</path>
</canvas>
</window>