Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

GRID in WPF

GRID is the default Container Component of WPF, which is used to represent WPF form elements and layout using Rows and Columns.

It is by default integrated by WPF Window Component.

<Grid.RowDefination>


</Grid.RowDefination>
<Grid.ColumnDefination>


</Grid.ColumnDefination>
<Window x:Class="WpfApp4.Window10"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp4"
        mc:Ignorable="d"
        Title="Window10">
    <StackPanel>
        <Grid Margin="0" Background="Yellow" Height="100">
            <Grid.RowDefinitions>
                <RowDefinition Height="35"></RowDefinition>
                <RowDefinition Height="35"></RowDefinition>
                <RowDefinition Height="35"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="60*"></ColumnDefinition>
                <ColumnDefinition Width="402*"/>
                <ColumnDefinition Width="463*"></ColumnDefinition>

            </Grid.ColumnDefinitions>

            <TextBlock Grid.Row="0" Grid.Column="0" Text="Enter Name" Grid.ColumnSpan="2"></TextBlock>
            <TextBox Grid.Row="0" Grid.Column="2" Name="txtname" ></TextBox>
            <TextBlock Grid.Row="1" Grid.Column="0" Text="Enter Mobile" Grid.ColumnSpan="2"></TextBlock>
            <TextBox Grid.Row="1" Grid.Column="2" Name="txtmobile" ></TextBox>
            <Button Grid.Row="2" Grid.Column="2" Content="Click" ></Button>

        </Grid>
    </StackPanel>
</Window>


Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post