扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:维维编译 来源:天极开发 2007年11月3日
关键字:
![]() 图2 |
<Window x:Class="AvalonHelloWorld.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/ presentation" xmlns:x= "http://schemas.microsoft.com/winfx/2006/xaml" Title="AvalonHelloWorld" Height="300" Width="300" Opacity="0.5"> <Grid> <Button Width="NaN" Height="37" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="114,0,8,8" Name="button1">Button</Button> <Label Width="NaN" Height="30.276666666666667" VerticalAlignment="Top" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="16,25.7233333333333,89.37,0" Name="label1" FontSize="20"> Enter Text Here:</Label> <TextBox Width="NaN" Height="42.276666666666671" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="16,0,34.37,157" Name="textBox1"></TextBox> </Grid> </Window> |
<Button Click="ButtonClick" Width="NaN" Height="37" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Grid.Column="0" Grid.ColumnSpan="1" Grid.Row="0" Grid.RowSpan="1" Margin="114,0,8,8" Name="button1">Button</Button> |
void ButtonClick(object sender, RoutedEventArgs e) { System.Windows.MessageBox.Show("Hello World to:" + textBox1.Text); } |
![]() 图3 |
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。