Reply
Old July 7th, 2011 Top | #1
 
Complete's Avatar
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 83

Default 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); ??
Complete is offline   Reply With Quote
Old July 7th, 2011 Top | #2
 
Complete's Avatar
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 83

Default Re: How do you span columns in C#?

Grid1.Children.Add(UserControl02);
Grid.SetColumnSpan(UserControl02, 3);
Complete is offline   Reply With Quote
Old July 8th, 2011 Top | #3
 
LordOfLA's Avatar
Godlike!
Joined: February 2004
Location: Salisbury, Wiltshire, UK
Posts: 7,031
Blog Entries: 5
Reputation: 4137
Power: 213

Default Re: How do you span columns in C#?

Thanks for the update!



If HK-47 and GLaDOS had a child, the character they create would cause the video game world to overdose on awesome. -sheridanmovieguy: Dragon age forum user.
LordOfLA is offline   Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules

Similar Threads
Thread Thread Starter Forum Replies Last Post
If Men Wrote Advice Columns!!!! ZeroHour Funny Farm 1 April 11th, 2006 3:58pm