Xceed Toolkit Plus for WPF v4.6 Documentation
Grid Class
Members  Example 


Xceed.Wpf.Toolkit Assembly > Xceed.Wpf.Toolkit.Panels Namespace : Grid Class
Exactly like WPF's native Grid panel, except this panel can animate its children and be used inside a SwitchPanel.
Syntax
'Declaration
 
<LocalizabilityAttribute(LocalizationCategory.Ignore)>
<ContentPropertyAttribute("Children")>
<StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)>
<XmlLangPropertyAttribute("Language")>
<UsableDuringInitializationAttribute(True)>
<RuntimeNamePropertyAttribute("Name")>
<UidPropertyAttribute("Uid")>
<TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)>
<NameScopePropertyAttribute("NameScope", System.Windows.NameScope)>
Public Class Grid 
   Inherits AnimationPanel
'Usage
 
Dim instance As Grid
[Localizability(LocalizationCategory.Ignore)]
[ContentProperty("Children")]
[StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)]
[XmlLangProperty("Language")]
[UsableDuringInitialization(true)]
[RuntimeNameProperty("Name")]
[UidProperty("Uid")]
[TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)]
[NameScopeProperty("NameScope", System.Windows.NameScope)]
public class Grid : AnimationPanel 
Example
<Window x:Class="GridSample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="GridSample">
  <xctk:Grid>
    <xctk:Grid.ColumnDefinitions>
      <xctk:ColumnDefinition />
      <xctk:ColumnDefinition />
      <xctk:ColumnDefinition />
    </xctk:Grid.ColumnDefinitions>
    <xctk:Grid.RowDefinitions>
      <xctk:RowDefinition />
      <xctk:RowDefinition />
      <xctk:RowDefinition />
    </xctk:Grid.RowDefinitions>
    <Rectangle Fill="Red" />
    <Rectangle Fill="Blue"
              Grid.Column="1"
              Grid.ColumnSpan="2" />
    <Rectangle Fill="Green"
              Grid.Row="1"
              Grid.ColumnSpan="2" />
    <Rectangle Fill="Orange"
              Grid.Row="1"
              Grid.Column="2"
              Grid.RowSpan="2" />
    <Rectangle Fill="Purple"
              Grid.Row="2"
              Grid.Column="0" />
    <Rectangle Fill="Yellow"
              Grid.Row="2"
              Grid.Column="1" />
  </xctk:Grid>
</Window>
Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Media.Visual
            System.Windows.UIElement
               System.Windows.FrameworkElement
                  System.Windows.Controls.Panel
                     Xceed.Wpf.Toolkit.Panels.PanelBase
                        Xceed.Wpf.Toolkit.Panels.AnimationPanel
                           Xceed.Wpf.Toolkit.Panels.Grid

Requirements

Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Grid Members
Xceed.Wpf.Toolkit.Panels Namespace