Hello I want a silverlight grid layout panel.
The width should be 100%.
There should be 2 columns that both take 50%.
In the columns there should be buttons that take 100% of the column cell..
Somehow I mess it up all the time and cannot find a way to do this.
Gridpanel is not a must... Stackpanel or whatever is fine too..
One more thing.. the grid is contained in a stackpanel
If nothing works.. code is fine too..
-------Stackpanel--------
|---griddpanel-100%-----|
||50% |50% ||
||Button100%|Button100%||
|-----------------------|
-------------------------
Thanks for any help...
This should do it 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With