A Grid Panel provides a flexible area which consists of rows and columns. In a Grid, child elements can be arranged in tabular form. Elements can be added to any specific row and column by using Grid.Row and Grid.Column properties
By default, a Grid panel is created with one row and one column. Multiple rows and columns are created by RowDefinitions and ColumnDefinitions properties. The height of rows and the width of columns can be defined in the following three ways −
The hierarchical inheritance of Canvas class is as follows.
Commonly Used Properties of Grid Class
Given below are the most commonly used properties of Grid.
|Sr. No.||Property & Description|
Commonly Used Methods of Grid Class
Given below are the most commonly used methods of Grid.
|Sr. No.||Methods & Description|
The following example shows how to add child elements into a Grid to specify it in a tabular form. In the following XAML implementation, Text Blocks are added in the first column and Text Boxes are added in the second column of the Grid.
When you compile and execute the above code, it will produce the following window.
We recommend that you execute the above example code and try some of the other properties of this class as well.
Windows Presentation Foundation(WPF) Related Interview Questions
|C#. NET Interview Questions||ASP.NET Interview Questions|
|Advanced Dot Net Interview Questions||OOPS Interview Questions|
|MVC Framework Interview Questions||MVVM Interview Questions|
|Windows Communication Foundation (WCF) Interview Questions||Dot Net Framework Interview Questions|
|Advanced C# Interview Questions||XAML Interview Questions|
|Win32 Api Interview Questions||Basic C Interview Questions|
|Asp Dot Net Mvc 4 Interview Questions||Windows Workflow Foundation Interview Questions|
Windows Presentation Foundation(WPF) Related Practice Tests
|C#. NET Practice Tests||ASP.NET Practice Tests|
|OOPS Practice Tests||Windows Communication Foundation (WCF) Practice Tests|
|Dot Net Framework Practice Tests|
Windows Presentation Foundation(wpf) Tutorial
Windows Presentation Foundation(wpf)
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.