Mega Code Archive

 
Categories / VB.Net / WPF
 

Using Width to constrain the size of elements

<Page     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">     <StackPanel>         <Label Width="100">Username</Label>         <TextBox Width="150">username@example.com</TextBox>         <Label Width="100">Password</Label>         <PasswordBox Width="150"></PasswordBox>         <Button Width="100" Content="Submit" />     </StackPanel> </Page>