Im trying to make a small screenshot program, im making a small WPF window with a border. This should function as a \"Viewport\" so everything inside the window (within the
Not sure if you want the window or just the grid transparent with border.
That draws a border around the window:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
AllowsTransparency="True"
WindowStyle="None"
Background="Transparent"
BorderThickness="2"
BorderBrush="Black">
<Grid>
</Grid>
</Window>
This is drawing a broder around the grid only:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525" AllowsTransparency="True" WindowStyle="None" Background="Transparent">
<Border BorderThickness="2" BorderBrush="Black">
<Grid>
</Grid>
</Border>
</Window>