网上找了不好半球WPF的实例,国内没有多少,都是些入门,学习了几天,感觉这WPF真够强大。和WINFORM根本就是一个天上一个地下。
今天我用Grid做了一个小小例子,大家可以看看,我也是初学WPF没有多长时间,希望高手多多指教。谢谢
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="浏览器" Height="240" Width="400">
<Grid Margin="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="78"></ColumnDefinition>
<ColumnDefinition Width="45" />
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
<ColumnDefinition Width="4"></ColumnDefinition>
<ColumnDefinition Width="80"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="25"></RowDefinition>
<RowDefinition Height="4"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="4"></RowDefinition>
<RowDefinition Height="25"></RowDefinition>
</Grid.RowDefinitions>
<TextBlock Text="请选择您的部门并留言:" VerticalAlignment="Center" Grid.ColumnSpan="2" Margin="0,5"></TextBlock>
<ComboBox Grid.Column="2" Grid.ColumnSpan="4"></ComboBox>
<TextBox Grid.Column="2" Grid.ColumnSpan="4" Grid.Row="2" BorderBrush="BurlyWood" />
<Button Content="提交" Grid.Column="3" Grid.Row="4" />
<Button Content="清除" Grid.Column="5" Grid.Row="4" />
</Grid>
</Window>