WPF transparent window flicker when resize to left in windows 11

I am trying to build a Windows 11 application with a transparent window. I achieved a transparent window by setting AllowsTransparency=True and WindowStyle=None. But when i resize to left there is flickering. There are similar questions in Stackoverflow related to flickering issues. Most of them are for win32 or not a proper solution given or some APIs may not supported now. I understand it is a Windows framework limitation by itself. So, I tried to use windowchrome property. I set NonClientFrameEdges= Left in windowchrome property. It works for Windows 10. There is no flickering in Windows 10. But in Windows 11 there is transparency fully gone there is a white background that comes in. This problem even exists in WinUI3.
I think it is quite noticeable and not a good experience as a user. Is there any way to reduce or remove this flickering?

I already go through these questions,
Flickering on window when resizing from left side questions
How to smooth ugly jitter/flicker/jumping when resizing windows, especially dragging left/top border (Win 7-10; bg, bitblt and DWM)?
https://github.com/microsoft/microsoft-ui-xaml/issues/5148

I am expecting a WPF transparent window without flickering on resize to the left. I am using .net8.

I create a WPF project. Project Here is the code example of MainWindow.xaml:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code><Window x:Class="BlurWindow.MainWindow"
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"
xmlns:local="clr-namespace:BlurWindow"
mc:Ignorable="d"
AllowsTransparency="True"
WindowStyle="None"
Background="#1f010100"
BorderBrush="White"
BorderThickness="2"
Title="MainWindow" Height="450" Width="800">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="32"/>
</WindowChrome.WindowChrome>
<Border x:Name="MainWindowBorder" Background="Transparent">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid Background="White" Grid.Row="0">
<StackPanel
HorizontalAlignment="Left"
VerticalAlignment="Center"
Orientation="Horizontal">
<TextBlock FontFamily="Arial"
Text="Sample App"/>
</StackPanel>
</Grid>
</Grid>
</Border>
</Window>
</code>
<code><Window x:Class="BlurWindow.MainWindow" 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" xmlns:local="clr-namespace:BlurWindow" mc:Ignorable="d" AllowsTransparency="True" WindowStyle="None" Background="#1f010100" BorderBrush="White" BorderThickness="2" Title="MainWindow" Height="450" Width="800"> <WindowChrome.WindowChrome> <WindowChrome CaptionHeight="32"/> </WindowChrome.WindowChrome> <Border x:Name="MainWindowBorder" Background="Transparent"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid Background="White" Grid.Row="0"> <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Horizontal"> <TextBlock FontFamily="Arial" Text="Sample App"/> </StackPanel> </Grid> </Grid> </Border> </Window> </code>
<Window x:Class="BlurWindow.MainWindow"
        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"
        xmlns:local="clr-namespace:BlurWindow"
        mc:Ignorable="d"
        AllowsTransparency="True"
        WindowStyle="None"
        Background="#1f010100"
        BorderBrush="White"
        BorderThickness="2"
        Title="MainWindow" Height="450" Width="800">
    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="32"/>
    </WindowChrome.WindowChrome>
    <Border x:Name="MainWindowBorder" Background="Transparent">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid Background="White" Grid.Row="0">
                <StackPanel 
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Orientation="Horizontal">
                    <TextBlock FontFamily="Arial"
                           Text="Sample App"/>
                </StackPanel>
               
            </Grid>
        </Grid>

    </Border>
</Window>

New contributor

Akram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật