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); ??
complete
-2
Junior Poster
Recommended Answers
Jump to PostGrid.SetColumnSpan.
In Vb but you should get the point.
Dim SpannedButton As New System.Windows.Controls.Button SpannedButton.HorizontalAlignment = Windows.HorizontalAlignment.Stretch SpannedButton.Content = "Spanned Three" Windows.Controls.Grid.SetColumn(SpannedButton, 0) Windows.Controls.Grid.SetRow(SpannedButton, 0) Windows.Controls.Grid.SetColumnSpan(SpannedButton, 3) Grid1.Children.Add(SpannedButton)
All 3 Replies
Unhnd_Exception
complete
-2
Junior Poster
Unhnd_Exception
commented:
Unhnd_Exception
-2
Unhnd_Exception
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.