<ResourceDictionary
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    x:CompileBindings="True">
    <ControlTheme x:Key="{x:Type PopupRoot}" TargetType="PopupRoot">
        <Setter Property="Background" Value="{x:Null}" />
        <Setter Property="TransparencyLevelHint" Value="Transparent" />
        <Setter Property="Template">
            <ControlTemplate TargetType="PopupRoot">
                <LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
                    <Panel>
                        <Border Name="PART_TransparencyFallback" IsHitTestVisible="False" />
                        <VisualLayerManager IsPopup="True">
                            <ContentPresenter
                                Name="PART_ContentPresenter"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}"
                                Content="{TemplateBinding Content}"
                                ContentTemplate="{TemplateBinding ContentTemplate}" />
                        </VisualLayerManager>
                    </Panel>
                </LayoutTransformControl>
            </ControlTemplate>
        </Setter>
    </ControlTheme>

    <ControlTheme x:Key="{x:Type OverlayPopupHost}" TargetType="OverlayPopupHost">
        <Setter Property="Template">
            <ControlTemplate>
                <LayoutTransformControl LayoutTransform="{TemplateBinding Transform}">
                    <VisualLayerManager IsPopup="True">
                        <ContentPresenter
                            Name="PART_ContentPresenter"
                            Padding="{TemplateBinding Padding}"
                            Background="{TemplateBinding Background}"
                            Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}" />
                    </VisualLayerManager>
                </LayoutTransformControl>
            </ControlTemplate>
        </Setter>
    </ControlTheme>
</ResourceDictionary>
