Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
430 views
in Technique[技术] by (71.8m points)

Adding a vertical scroll bar to a wpf Grid while keeping the header line fixed

I am trying to add a vertical scrollbar to a in WPF. I tried adding the grid into a component which works but then the whole grid scrolls and the header row scrolls as well. I tried without the but then didn't find a VerticalScroll property for the control.

Any help would be very appreciated,

Thanks

Pat

question from:https://stackoverflow.com/questions/65857380/adding-a-vertical-scroll-bar-to-a-wpf-grid-while-keeping-the-header-line-fixed

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
     <ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">
//Put the content that you want scrollable here
            <Grid>
                
            </Grid>
        </ScrollViewer>

Not enough information really maybe post your code?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...