I need a hint as to how to get the user out of the screen in the WPF window. I made a window that does not fit on the screen and needs to be scrolled so that more data can be added, but I have no idea how to do it. Or maybe I can add a slider to see a further label?
Asked
Active
Viewed 30 times
1 Answers
0
You should use scroll-viewer control. see this How to add scroll viewer. Hope it helps.
In XAML
<ScrollViewer VerticalScrollBarVisibility="Auto">
Put other xaml content here..
</ScrollViewer>
or you can show Scrollbar in Grid
<Grid ScrollViewer.CanContentScroll="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto">
...
</Grid>
Or in Program
ScrollViewer sv = new ScrollViewer();
sv.VerticalScrollBarVisibility = ScrollBarVisibility.Visible;
myGrid.Children.Add(sv);

Hammas_Stack1
- 184
- 1
- 13