Resolved ScrollViewer doesn't work with dynamically created content

wlf

Member
Joined
Apr 26, 2020
Messages
12
Programming Experience
Beginner
Hi, I have a dockPanel inside a scrollviewer.
In that dockpanel I create a lot of buttons, and what happens is that the scrollviewer doesnt react at all and new buttons just clip through the app.
(And when I resize the app they stay cropped).
I can't find any instructions on how to set that up properly.
 
Hi, I have a dockPanel inside a scrollviewer.
In that dockpanel I create a lot of buttons, and what happens is that the scrollviewer doesnt react at all and new buttons just clip through the app.
(And when I resize the app they stay cropped).
I can't find any instructions on how to set that up properly.
Hi people it looks like declaring the grid row height to "*" solves the problem. Heres what I was doing...
C#:
<Grid>
  <Grid.RowDefinitions>
    <RowDefinition
      Height="90" />
    <RowDefinition
      Height="*" />
    <Border />
    <ScrollViewer
      Grid.Row="1"
      HorizontalScrollBarVisibility="Auto">
      <UniformGrid Columns="4" Name="ListingControl">
      </UniformGrid>
    </ScrollViewer>
  </Grid.RowDefinitions>
</Grid>
GymManagement_hqE0bqkK0v.png
 

Latest posts

Back
Top Bottom