这是通过 WPF 模板创建项目时的默认窗口:
void display(unsigned n, int printzeroes)
{
unsigned mask = 1 << (CHAR_BIT * sizeof(mask) - 1);
int print = printzeroes;
while(mask)
{
if(n & mask)
{
print = 1;
}
if(print) printf("%d", !!(n & mask));
mask >>= 1;
}
}
如何删除?
答案 0 :(得分:1)
您可以设置Window.WindowStyle="ToolWindow"
。你还是会有阴影的。
<Window x:Class="Chaco.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:Chaco"
mc:Ignorable="d"
WindowStyle="ToolWindow"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Button x:Name="ButtonMain" Content="Main" Width="100" Height="50" Background="White">
</Button>
</Grid>
</Window>
或者你可以设置WindowChrome.WindowChrome
附加属性,设置GlassFrameThickness="0"
也会去除阴影:
<WindowChrome.WindowChrome>
<WindowChrome GlassFrameThickness="0"/>
</WindowChrome.WindowChrome>
另一种方法是通过窗口设置 WindowStyle="None"
和 AllowsTransparency="True"
。