Set Row Height and column Width for Grid : Grid Operations « Windows Presentation Foundation « C# / CSharp Tutorial

Home
C# / CSharp Tutorial
1.Language Basics
2.Data Type
3.Operator
4.Statement
5.String
6.struct
7.Class
8.Operator Overload
9.delegate
10.Attribute
11.Data Structure
12.Assembly
13.Date Time
14.Development
15.File Directory Stream
16.Preprocessing Directives
17.Regular Expression
18.Generic
19.Reflection
20.Thread
21.I18N Internationalization
22.LINQ
23.GUI Windows Forms
24.Windows Presentation Foundation
25.Windows Communication Foundation
26.Workflow
27.2D
28.Design Patterns
29.Windows
30.XML
31.XML LINQ
32.ADO.Net
33.Network
34.Directory Services
35.Security
36.unsafe
C# / C Sharp
C# / C Sharp by API
C# / CSharp Open Source
C# / CSharp Tutorial » Windows Presentation Foundation » Grid Operations 
24.45.1.Set Row Height and column Width for Grid
<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="GridButton" Height="193" Width="219">
    <Grid>
        <Button Name="btnGrid" Height="100" Width="150">
            <Grid Height="90" Width="140">
                <Grid.RowDefinitions>
                    <RowDefinition Height="33*" />
                    <RowDefinition Height="33*" />
                    <RowDefinition Height="33*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="33*" />
                    <ColumnDefinition Width="33*" />
                    <ColumnDefinition Width="33*" />
                </Grid.ColumnDefinitions>
                <Label Content="Left" Grid.Row="0" Grid.Column="0" />
                <Label Content="Middle" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center" />
                <Label Content="Right" Grid.Row="2" Grid.Column="2" VerticalAlignment="Bottom" HorizontalAlignment="Right" />
            </Grid>
        </Button>
    </Grid>
</Window>
WPF Set Row Height And Column Width For Grid
24.45.Grid Operations
24.45.1.Set Row Height and column Width for GridSet Row Height and column Width for Grid
24.45.2.Set Row and Column Index when Adding Buttons to GridSet Row and Column Index when Adding Buttons to Grid
24.45.3.Clear All ColumnsClear All Columns
24.45.4.Clear All RowsClear All Rows
24.45.5.Remove One ColumnRemove One Column
24.45.6.Remove One RowRemove One Row
24.45.7.The current number of ColumnsThe current number of Columns
24.45.8.The current number of RowsThe current number of Rows
24.45.9.Remove 5 Columns with ColumnDefinitions.RemoveRangeRemove 5 Columns with ColumnDefinitions.RemoveRange
24.45.10.Remove 5 Row with RowDefinitions.RemoveRangeRemove 5 Row with RowDefinitions.RemoveRange
24.45.11.Contains RowContains Row
24.45.12.Contains Column?Contains Column?
24.45.13.Insert RowInsert Row
24.45.14.Insert ColumnInsert Column
24.45.15.Is Grid ReadOnlyIs Grid ReadOnly
24.45.16.Add a ColumnDefinition to GridAdd a ColumnDefinition to Grid
24.45.17.Add a RowDefinition to GridAdd a RowDefinition to Grid
24.45.18.Setting Grid row heights in codeSetting Grid row heights in code
24.45.19.Set control to specific row and column in codeSet control to specific row and column in code
24.45.20.Show Grid lines in codeShow Grid lines in code
24.45.21.Programmatically use the positioning methods of GridProgrammatically use the positioning methods of Grid
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.