C# 将Aero框架更换为单色框架
我的问题既简单又困难: 我怎样才能像VisualStudio11那样用单色的玻璃框替换窗户的玻璃框呢 我已经尝试过使用Windows窗体并将其边框设置为“无”,但这将缺少Aero Snap功能。 我看到Adobe括号使用了一些熟悉的东西,但没有Visual Studio那么完美。C# 将Aero框架更换为单色框架,c#,wpf,winforms,windows-7,C#,Wpf,Winforms,Windows 7,我的问题既简单又困难: 我怎样才能像VisualStudio11那样用单色的玻璃框替换窗户的玻璃框呢 我已经尝试过使用Windows窗体并将其边框设置为“无”,但这将缺少Aero Snap功能。 我看到Adobe括号使用了一些熟悉的东西,但没有Visual Studio那么完美。 我认为VisualStudio使用WPF,因此,这应该是可能的 只需将窗口模板替换为更简单的内容: <Window x:Class="WpfApplication11.MainWindow" xm
我认为VisualStudio使用WPF,因此,这应该是可能的 只需将窗口模板替换为更简单的内容:
<Window x:Class="WpfApplication11.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"
WindowStyle="None" AllowsTransparency="True">
<Window.Template>
<ControlTemplate TargetType="Window">
<Grid Background="Blue">
<ContentPresenter ContentSource="Content"/>
</Grid>
</ControlTemplate>
</Window.Template>
</Window>
或
使用
编辑:这只适用于
WindowStyle=“None”
和allowtransparency=“True”
谢谢,我会看一下的。好吧,您错过了结束标记中的一些反斜杠。无论如何,这并不是OP想要的,它带来的效果就像这样BackColor=Color.Blue代码>在winforms
中。我已经测试过了,窗口Chrome
仍然是透明的。@KingKing查看我的编辑。@HighCore我认为这仍然不是OP想要的,OP想要保持控制框
带有最小化、最大化和关闭按钮,他只想禁用标题栏和窗口周围边框的玻璃效果。顺便说一句,编辑后的效果可以通过FormBorderStyle=FormBorderStyle来实现。如果您有更好的答案,请继续发布。顺便说一句,winforms很烂,完全没用。请检查以下问题: