0

I am trying to set a geometry to fullscreen, however there is still space at the bottom and right which is not covered.

XAML View

<Window x:Class="Example.Views.Example"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Title="example" WindowStyle="None" WindowState="Maximized" AllowsTransparency="True"
    Opacity="1"
    Background="Transparent" MouseDown="Feast_MouseDown" MouseUp="Feast_MouseUp" MouseMove="Feast_MouseMove">
<Grid>
    <Canvas>
        <Path Stroke="Black" Fill="White" Opacity="0.35">
            <Path.Data>
                <CombinedGeometry GeometryCombineMode="Exclude">
                    <CombinedGeometry.Geometry1>
                        <RectangleGeometry Rect="{Binding DetailRect}" />
                    </CombinedGeometry.Geometry1>
                    <CombinedGeometry.Geometry2>
                        <RectangleGeometry Rect="{Binding SecondRect}" />
                    </CombinedGeometry.Geometry2>
                </CombinedGeometry>
            </Path.Data>
        </Path>
    </Canvas>
</Grid>

Setting Rect to Screensize:

DetailRect = new Rect(SystemInformation.VirtualScreen.Left, SystemInformation.VirtualScreen.Top, SystemInformation.VirtualScreen.Width, SystemInformation.VirtualScreen.Height);
F4ll0ut
  • 309
  • 5
  • 15
  • 1
    The window is larger than the screen, but the Path is top/left aligned, hence the gap at the bottom and the right. – Clemens Jun 12 '19 at 11:36
  • @Clemens I have set the size of the window to 1920*1080. Still Still have the same problem. – F4ll0ut Jun 12 '19 at 16:20

0 Answers0