Silverlight grid (panel) 2 columns 50% / 50%

Hello, I want a silverlight grid layout panel.
Width should be 100%.
There should be 2 columns that occupy 50%.
Columns must have buttons that accept 100% of the cell in the column.


Somehow I messed up all the time and can't find a way to do this.
Gridpanel is not necessary ... Stackpanel or something like that too ..
One more thing: the grid is contained in the stack
If nothing works .. the code is good too ..

-------Stackpanel-------- |---griddpanel-100%-----| ||50% |50% || ||Button100%|Button100%|| |-----------------------| ------------------------- 

Thanks for any help ...

+4
source share
1 answer

This should do it:

 <StackPanel> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="50*" /> <ColumnDefinition Width="50*" /> </Grid.ColumnDefinitions> <Button Grid.Column="0">B1</Button> <Button Grid.Column="1">B2</Button> </Grid> </StackPanel> 
+7
source

All Articles