How to use WindowChrome without Windows Aero glass effects in wpf, black border

后端 未结 1 892
情深已故
情深已故 2021-02-14 12:41

I\'m trying to customize a window border by using the WindowChrome class. Without Windows Aero glass effects. As expected I end up with a black boarder. But i also end up withou

相关标签:
1条回答
  • 2021-02-14 13:09

    I'm experimenting with WindowChrome too and my application works so far:

    <Window ...>
        <Window.Style>
            <Style TargetType="{x:Type Window}">
                <Setter Property="shell:WindowChrome.WindowChrome">
                    <Setter.Value>
                        <shell:WindowChrome CaptionHeight="15"
                                            CornerRadius="0"
                                            GlassFrameThickness="0,0,0,-1"
                                            NonClientFrameEdges="None"
                                            ResizeBorderThickness="5"
                                            UseAeroCaptionButtons="true"/>
                    </Setter.Value>
                </Setter>
            </Style>
        </Window.Style>
        <!-- Add content to normal window content (not with template, at first) -->
        <Grid>
    
        </Grid>
    </Window>
    

    You should have an empty window with nothing more than the caption buttons and a glass window if you use my code above.

    0 讨论(0)
提交回复
热议问题