I create One grid in wpf. when maximize the window the grid size in increased.So i want to center the grid when i maximize the window the increasing the grid size.Here the code i wrote.
<Grid x:Name="LayoutRoot">
<Grid Margin="188,69,179,172" Background="#FF1B9B7B"/>
<Rectangle Fill="#FF971A92" Height="70" Margin="233,139,315,0" Stroke="Black" VerticalAlignment="Top"/>
<Rectangle Fill="#FF97311A" Height="70" Margin="0,139,214,0" Stroke="Black" VerticalAlignment="Top" HorizontalAlignment="Right" Width="84"/>
</Grid>
Dont forget to specify Height and Width to inner Grid .I hope this will help.