How do I assign a StackPanel to a specific Grid row/column in code (not XAML)?

Posted by scottmarlowe on Stack Overflow See other posts from Stack Overflow or by scottmarlowe
Published on 2010-03-31T15:03:13Z Indexed on 2010/03/31 16:03 UTC
Read the original article Hit count: 305

Filed under:

Given this XAML:

<StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Margin="5">

How can I assign the Grid.Row and Grid.Column attributes in (C#/VB) code?

StackPanel stackPanel = new StackPanel();
stackPanel.???

© Stack Overflow or respective owner

Related posts about Silverlight