Skip to content

Window RenderTransform causes wrong content presentation #18654

Closed as not planned
@metaone01

Description

@metaone01

Describe the bug

When RenderTransform specified rotate, its content will become relative and other parts became fully transparent (even if ExtendClientAreaToDecorationsHint="True" ExtendClientAreaChromeHints="NoChrome" ExtendClientAreaTitleBarHeightHint="-1" SystemDecorations="None"are NOT SET)
The white block is the window background, belongs to the window, and remains are not.

Image

To Reproduce

<Window xmlns="https://github.com/avaloniaui"
        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" d:DesignWidth="800" d:DesignHeight="450"
        x:Class="Test.MainWindow"
        Title="Test"
        Width="200"
        Height="800"
        RenderTransform="Rotate(90deg)">
    <Border>
        <TextBlock Text="TestRotatedWindow" />
    </Border>
</Window>

Expected behavior

No response

Avalonia version

11.3.0-beta2

OS

Windows

Additional context

I know it is not a good idea to rotate the window. But it actually causes a wrong render and may cause some unintended security problems, like screenshots, like a larger than screen window to capture keyboard and mouse inputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions