Here i am giving you little code snippets for stack panel . Stack panel is much more useful to manage wpf controls in simple layouts.
MainWindow
Both text blocks in same row .
MainWindow
<Window x:Class="stackpanel.MainWindow"Here you can see that i have used stack panel for design of two textblocks. You can see output here
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel Orientation="Horizontal">
<TextBlock Text="What's your Name!!" Height="Auto" Margin="20,20,20,263"/>
<TextBox Text="" Width="100" Height="Auto" Margin="3,20,20,263"/>
</StackPanel>
</Grid>
</Window>
Both text blocks in same row .
0 comments:
Post a Comment