您的位置:首页 > 其它

WPF系列:无边框窗口

2016-03-15 08:43 387 查看
<Window x:Class="Ares.Animations.Window3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window3" Height="300" Width="300" WindowStyle="None" Background="{x:Null}" AllowsTransparency="True" >
<DockPanel Background="BlueViolet">
<Border Height="30" Background="BlueViolet" DockPanel.Dock="Top" MouseLeftButtonDown="Window_MouseLeftButtonDown">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock FontSize="18">无边框窗口</TextBlock>
<StackPanel Grid.Column="1"  Orientation="Horizontal" HorizontalAlignment="Right">
<Rectangle Width="30" Height="30" Fill="Red" Stroke="Black" StrokeThickness="2"></Rectangle>
<Rectangle Width="30" Height="30" Fill="Red" Stroke="Black" StrokeThickness="2"></Rectangle>
<Rectangle Width="30" Height="30" Fill="Red" Stroke="Black" StrokeThickness="2"  MouseDown="Rectangle_MouseDown"></Rectangle>
</StackPanel>
</Grid>
</Border>
<Border  Background="WhiteSmoke" >
<TextBlock>Center</TextBlock>
</Border>
</DockPanel>
</Window>


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: