Grid in ScrollViewer : Grid « 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# / CSharp Tutorial » Windows Presentation Foundation » Grid 
24.42.9.Grid in ScrollViewer
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  HorizontalAlignment="Center" VerticalAlignment="Center">
<ScrollViewer>
  <Grid>
    <Grid.ColumnDefinitions>
      <ColumnDefinition Width="*" />
      <ColumnDefinition Width="Auto" />
      <ColumnDefinition Width="Auto" />
    </Grid.ColumnDefinitions>
    <Grid.RowDefinitions>
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
      <RowDefinition Height="Auto" />
    </Grid.RowDefinitions>

    <Border Grid.Column="0" Grid.Row="0" Background="LightGray" BorderBrush="Gray" BorderThickness="1">
      <TextBlock>Key</TextBlock>
    </Border>
    <Border Grid.Column="1" Grid.Row="0" Background="LightGray" BorderBrush="Gray" BorderThickness="1">
        <TextBlock>Value</TextBlock>
    </Border>
    <Border Grid.Column="2" Grid.Row="0" Background="LightGray" BorderBrush="Gray" BorderThickness="1">
      <TextBlock>Value 2</TextBlock>
    </Border>
    <TextBlock Grid.Column="0" Grid.Row="1" Text="WPF" />
    <TextBlock Grid.Column="1" Grid.Row="1" Text="Inc." />
    <TextBlock Grid.Column="2" Grid.Row="1" Text="this" />
    <TextBlock Grid.Column="0" Grid.Row="2" Text="is" />
    <TextBlock Grid.Column="1" Grid.Row="2" Text="a" />
    <TextBlock Grid.Column="2" Grid.Row="2" Text="test" />
  </Grid>
</ScrollViewer>
</Page>
WPF Grid In Scroll Viewer
24.42.Grid
24.42.1.Simple Grid.xamlSimple Grid.xaml
24.42.2.Use Grid to layout a CalendarUse Grid to layout a Calendar
24.42.3.Grid with Rectangle and GeometryDrawingGrid with Rectangle and GeometryDrawing
24.42.4.Set Grid Row and Column for a ButtonSet Grid Row and Column for a Button
24.42.5.Arrange UI Elements in a GridArrange UI Elements in a Grid
24.42.6.Align Ellipses along with GridAlign Ellipses along with Grid
24.42.7.Show Grid LinesShow Grid Lines
24.42.8.Multiple Items in a Grid CellMultiple Items in a Grid Cell
24.42.9.Grid in ScrollViewerGrid in ScrollViewer
24.42.10.Margin vs Padding and GridMargin vs Padding and Grid
24.42.11.Window with GridWindow with Grid
24.42.12.Arrange the children for GridArrange the children for Grid
24.42.13.Put more than one Object to one Grid CellPut more than one Object to one Grid Cell
24.42.14.Nested GridNested Grid
24.42.15.Shared Size GroupShared Size Group
24.42.16.Use the Grid element to create a standard user interface (UI) dialog box.Use the Grid element to create a standard user interface (UI) dialog box.
24.42.17.Place and size rectangles and ellipses in Grid cellsPlace and size rectangles and ellipses in Grid cells
24.42.18.Use Image as the Grid backgroundUse Image as the Grid background
24.42.19.Grid with SharedSizeGroupGrid with SharedSizeGroup
24.42.20.Layout a Form with StackPanel and GridLayout a Form with StackPanel and Grid
24.42.21.Layout Controls with Grid in codeLayout Controls with Grid in code
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.