I have Dockpanel on which there are two buttons (left and right sides) and a scrollviewer at the bottom. Is it possible to hide the left and right sides of this scrollviewer UNDER this buttons?
Asked
Active
Viewed 2,329 times
1 Answers
6
You could use a Grid
instead of a DockPanel
, either use the alignments or create columns and adjust the ColumnSpan
, example of the latter:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- Order matters, earlier controls are at the bottom unless you use Panel.ZIndex -->
<ScrollViewer Grid.Column="0" Grid.ColumnSpan="3"/>
<Button Grid.Column="0" Content="Left"/>
<Button Grid.Column="2" Content="Right"/>
</Grid>
(DockPanel is quite a poor control which can easily be replaced with a Grid in about every case)

H.B.
- 166,899
- 29
- 327
- 400
-
hmmm.. thank you very much H.B. it sounds very good. i ll try to do it in my project. – curiousity Nov 10 '11 at 09:35