CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2005
    Posts
    180

    How do you span columns in C#?

    How do you span columns in C#?
    In silverlight, suppose you have a grid, and this grid is in 3 columns.
    and you want to add a UserControl to this grid but you want it to span all three
    columns. How would that C# code look like?
    Grid1.Children.Add(UserControl01);
    But then what?
    Grid1.Children.ElementAt(1).SetValue(Grid.SetRowSpan, 2);
    ??

  2. #2
    Join Date
    Dec 2005
    Posts
    180

    Re: How do you span columns in C#?

    Grid1.Children.Add(UserControl01);

    Grid.SetColumnSpan(UserControl01, 3);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured