WPF布局

<Window x:Class="PipeSystem.UI.Froms.FrmGenerate"
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:PipeSystem.UI.Froms"
mc:Ignorable="d"
Title="FrmGenerate" Height="420" Width="550">
<Grid>
<DockPanel>
<Grid DockPanel.Dock="Top" Height="50" Background="#8080FF">
<TextBlock Text="生成周报" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="22" Foreground="white" />
</Grid>
<Grid DockPanel.Dock="Top" Height="35">
<TextBlock Text="快捷查询:" FontSize="13" Foreground="#8080FF" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
<Grid DockPanel.Dock="Top" Height="150">
<Border Width="500" BorderBrush="#B6B6B6" BorderThickness="1" >
<!--上下布局-->
<StackPanel>
<Grid Height="50">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="250">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="125">
<TextBlock Text="查询时间:" FontSize="15" Foreground="#B6B6B6" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>
<Grid DockPanel.Dock="Left" Width="125">
<DatePicker Width="100" Height="25" HorizontalAlignment="Left"/>
</Grid>
</DockPanel>
</Grid>
<Grid DockPanel.Dock="Left" Width="250">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="100">
<TextBlock Text="作业团队:" FontSize="15" Foreground="#B6B6B6" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>
<Grid DockPanel.Dock="Left" Width="125">
<ComboBox Width="100" IsEditable="True" Height="25" HorizontalAlignment="Left"/>
</Grid>
</DockPanel>
</Grid>
</DockPanel>
</Grid>
<Grid Height="50">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="250">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="125">
<TextBlock Text="物探分区:" FontSize="15" Foreground="#B6B6B6" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>
<Grid DockPanel.Dock="Left" Width="125">
<ComboBox Width="100" Height="25" IsEditable="True" HorizontalAlignment="Left"/>
</Grid>
</DockPanel>
</Grid>
<Grid DockPanel.Dock="Left" Width="250">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="100">
<TextBlock Text="所属街道:" FontSize="15" Foreground="#B6B6B6" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>
<Grid DockPanel.Dock="Left" Width="125">
<ComboBox Width="100" Height="25" IsEditable="True" HorizontalAlignment="Left"/>
</Grid>
</DockPanel>
</Grid>
</DockPanel>
</Grid>
<Grid Height="50">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="250">
<DockPanel>
<Grid DockPanel.Dock="Left" Width="125">
<TextBlock Text="所属流域:" FontSize="15" Foreground="#B6B6B6" VerticalAlignment="Center" HorizontalAlignment="Right" />
</Grid>
<Grid DockPanel.Dock="Left" Width="125">
<ComboBox Width="100" Height="25" IsEditable="True" HorizontalAlignment="Left" />
</Grid>
</DockPanel>
</Grid>
<Grid DockPanel.Dock="Left" Width="250">

</Grid>
</DockPanel>
</Grid>
</StackPanel>

</Border>
</Grid>
<Grid DockPanel.Dock="Top" Height="35" >
<TextBlock Text="其他设置:" FontSize="13" Foreground="#8080FF" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
<Grid DockPanel.Dock="Top" Height="60">
<Border Width="500" BorderBrush="#B6B6B6" BorderThickness="1">
<!--左右布局-->
<DockPanel>
<Grid DockPanel.Dock="Left" Width="125">
<TextBlock Text="存放路径:" VerticalAlignment="Center" HorizontalAlignment="Right" Foreground="#B6B6B6" FontSize="16" />
</Grid>
<Grid DockPanel.Dock="Left" Width="350">
<TextBox Height="30" Width="311" HorizontalAlignment="Left" BorderBrush="#BCBCBC" Margin="0,14"/>
</Grid>
</DockPanel>
</Border>
</Grid>
<Grid DockPanel.Dock="Top">
<Button Name="btnOK" Click="btnOK_Click" Content="确定" Width="80" Height="30" HorizontalAlignment="Right" Margin="0,15,133,14" Style="{StaticResource commonButtonStyle}" />
<Button Name="btnCancel" Click="btnCancel_Click" Content="取消" Width="80" Height="30" HorizontalAlignment="Right" Margin="0,15,21,14" Style="{StaticResource commonButtonStyle}"/>
</Grid>
</DockPanel>

</Grid>
</Window>

看了还不点关注!可恶!

posted @ 2020-10-20 17:36  林新i  阅读(131)  评论(0编辑  收藏  举报