Is there similar properity like Anchor Properity in WPF?
-
Like in .NET FW 2.0, there is Anchor property to set the controls Auto arrange. It will be much helpful if anyone could share info about similar property in WPF
For objects that are placed inside a grid a combination of HorizontalAlignment, VerticalAlignment and Margin can be used to control the position in a similar way to "Anhor". Anchor right & bottom <=> HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin=",,," Anchor left & right <=> HorizontalAlignment="Stretch". As I said the controls must be placed inside a grid; Mihai,
-
For objects that are placed inside a grid a combination of HorizontalAlignment, VerticalAlignment and Margin can be used to control the position in a similar way to "Anhor". Anchor right & bottom <=> HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin=",,," Anchor left & right <=> HorizontalAlignment="Stretch". As I said the controls must be placed inside a grid; Mihai,
-
Like in .NET FW 2.0, there is Anchor property to set the controls Auto arrange. It will be much helpful if anyone could share info about similar property in WPF
Don't think in terms of anchors ... WPF is a different beast. As well as using Layout Grids you need to think about putting stack panels and so forth inside grids in order to get the layout of things working properly. Simply using grids and then margins and so on will yield a UI that doesn't always scale well. Grids are good for deviding up UI but not the best way to actually position things ...
Jammer Going where everyone here has gone before! :) My Blog | Article(s)