Basic skills (07) -------- WPF login interface layout, wpf Interface
I:
Ii. XAML code
<Window x: Class = "wpf exercises. login form "xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation "xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" Title = "login form" Height = "200" Width = "300"> <Grid. columnDefinitions> <ColumnDefinition> </Grid. columnDefinitions> <Grid. rowDefinitions> <RowDefinition> </Grid. rowDefinitions> <TextBlock Text = "username:" Grid. column = "0" Grid. row = "0" VerticalAlignment = "Center" HorizontalAlignment = "Center"> </TextBlock> <TextBox Name = "txtName" Text = "marathon" align = "Center" VerticalContentAlignment = "Center ""Center" Grid. row = "0" Grid. column = "0" Margin = "10" Grid. columnSpan = "2" Width = "175" HorizontalAlignment = "Right"> </TextBox> <TextBlock Text = "Password:" Grid. row = "1" Grid. column = "0" VerticalAlignment = "Center" HorizontalAlignment = "Center"> </TextBlock> <PasswordBox Name = "pwdInfo" Grid. row = "1" Grid. column = "0" Margin = "10" Grid. columnSpan = "2" Width = "175" HorizontalAlignment = "Right"> </PasswordBox> <Button Name = "btnLogin" Content = "login" Grid. column = "0" Grid. row = "2" Margin = "10" Width = "75"> </Button> <Button Name = "btnCancel" Content = "cancel" Grid. column = "2" Grid. row = "2" Margin = "10" Width = "75"> </Button> </Grid> </Window>