Reputation: 91
I got a problem with the ScrollViewer in Visual Studio. First off, I'm german and my english isn't that good, so I hope you guys understand me. Here's the problem:
I made a timetable in C# and it's way too big for the window to display everything on the timetable. Then I added scrollbars but the problem is that they're not "active". Means I can't scroll even though they're visible. I have no idea what isn't working there, so I thought you could help me. Hopefully somebody knows how to solve the problem. Here's the code for the scrollviewer:
<ScrollViewer HorizontalScrollBarVisibility="Visible VerticalScrollBarVisibility="Visible" Margin="10,0,0,0" >
<Canvas x:Name="uiCVStundenplan" Background="White" Margin="116,65,10,10" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
</Canvas>
</ScrollViewer>
As I said before, the timetable is way too big for the window. So I don't understand why the scrollbars aren't active.
I hope I explained it well enough for you. I'm counting on you!♥
Upvotes: 0
Views: 72
Reputation: 21
I think there is a mistake in your code. You forget a double quote after HorizontalScrollBarVisibility, after Visible.
<ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" Margin="10,0,0,0" >
<Canvas x:Name="uiCVStundenplan" Background="White" Margin="116,65,10,10" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
</Canvas>
</ScrollViewer>
Upvotes: 1