Arranges child elements in a flexible grid area that consists of columns and rows.
Inheritance: Layout
Exemplo n.º 1
0
 private void Grid_Click(object sender, RoutedEventArgs e)
 {
     ComponentFactory.Quicksilver.Layout.GridLayout layout = new ComponentFactory.Quicksilver.Layout.GridLayout();
     for (int i = 0; i < 8; i++)
     {
         layout.ColumnDefinitions.Add(new ComponentFactory.Quicksilver.Layout.ColumnDefinition());
         layout.RowDefinitions.Add(new ComponentFactory.Quicksilver.Layout.RowDefinition());
         layout.ColumnDefinitions[i].Width = new GridLength(30);
         layout.RowDefinitions[i].Height   = new GridLength(30);
     }
     TargetPanel.LayoutDefinitions.Clear();
     TargetPanel.LayoutDefinitions.Add(layout);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize a new instance of the MetaGridPanel class.
 /// </summary>
 public MetaGridPanel()
 {
     _layout = new GridLayout();
     Layouts.Add(_layout);
 }
 private void Grid_Click(object sender, RoutedEventArgs e)
 {
     ComponentFactory.Quicksilver.Layout.GridLayout layout = new ComponentFactory.Quicksilver.Layout.GridLayout();
     for (int i = 0; i < 8; i++)
     {
         layout.ColumnDefinitions.Add(new ComponentFactory.Quicksilver.Layout.ColumnDefinition());
         layout.RowDefinitions.Add(new ComponentFactory.Quicksilver.Layout.RowDefinition());
         layout.ColumnDefinitions[i].Width = new GridLength(30);
         layout.RowDefinitions[i].Height = new GridLength(30);
     }
     TargetPanel.LayoutDefinitions.Clear();
     TargetPanel.LayoutDefinitions.Add(layout);
 }