Questions tagged [scrollviewer]

A scroll viewer is a user interface construct that provides a scrolling area to any control(or hierarchy of controls) that is placed within it.

A scroll viewer is a user interface construct that provides a scrolling area to any control(or hierarchy of controls) that is placed within it. May refer specifically to the wpf/silverlight ScrollViewer.

1187 questions
147
votes
3 answers

WPF: ItemsControl with scrollbar (ScrollViewer)

I followed this small "tutorial" on how to add a scrollbar to an ItemsControl, and it works in Designer view, but not when I compile and execute the program (only the first few items show up, and no scrollbar to view more - even when…
Xuntar
  • 2,260
  • 3
  • 21
  • 31
97
votes
7 answers

How can I get a vertical scrollbar in my ListBox?

In the example below I have a ListBox with dozens of font names in it. I would have thought it would automatically have a vertical scrollbar on it so that you can select ANY font, not just the first ones in the list, but it doesn't. So I added a…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
79
votes
9 answers

How can I get ScrollViewer to work inside a StackPanel?

In the following WPF XAML the ScrollViewer does not work (it displays a scroll bar but you cannot scroll and the contents go off the window to the bottom). I can change the outer StackPanel to a Grid and it will work. However, in my application from…
Edward Tanguay
  • 189,012
  • 314
  • 712
  • 1,047
74
votes
6 answers

ScrollViewer mouse wheel not scrolling

I am currently working on my first WPF project and trying to make a ListView scrollable. At first I thought this could be easily done by simply limiting the ListView's width and height and thus forcing a scrollbar to appear automatically whenever…
sadeniju
  • 743
  • 1
  • 5
  • 6
54
votes
14 answers

WPF: How to make canvas auto-resize?

I would like my Canvas to automatically resize to the size of its items, so that the ScrollViewer scroll bars have the correct range. Can this be done in XAML?
Qwertie
  • 16,354
  • 20
  • 105
  • 148
44
votes
5 answers

Child elements of scrollviewer preventing scrolling with mouse wheel?

I'm having a problem getting mouse wheel scrolling to work in the following XAML, which I have simplified for clarity:
Tom
  • 627
  • 1
  • 5
  • 11
44
votes
4 answers

How to increase scrollbar width in WPF ScrollViewer?

I am working on a touch screen on a small device and the custom width of the scroll-bar is no good as one of my requirements is that everything needs to be doable by finger gestures. How can I set the width of the WPF ScrollViewer scrollbar? Note…
JohnIdol
  • 48,899
  • 61
  • 158
  • 242
40
votes
5 answers

ScrollViewer not scrolling in WPF

I am using a scrollviewer control around my stack panel which contains an ItemsControl. When there are many items in the ItemsControl it is suppose to scroll but for some reason it just cuts of the items. Here is the code:
azamsharp
  • 19,710
  • 36
  • 144
  • 222
38
votes
2 answers

Stop WPF ScrollViewer automatically scrolling to perceived content

The Application I am building an application which includes a range selector. This consists of two custom drawn Slider controls contained within one UserControl derived class. The range selector control is then contained inside a ScrollViewer which…
user989056
  • 1,275
  • 2
  • 15
  • 33
38
votes
4 answers

Animated (Smooth) scrolling on ScrollViewer

I have a ScrollViewer in my WPF App, and I want it to have smooth/animated scrolling effect just like Firefox has (if you know what I am talking about). I tried to search over the internet, and the only thing I've found is this: How To Create An…
Ron
  • 3,975
  • 17
  • 80
  • 130
37
votes
3 answers

why setting ScrollViewer.CanContentScroll to false disable virtualization

As most WPF developers know, setting ScrollViewer.CanContentScroll to false will disable virtualization; but I'd like to know how it works, because I try to enable virtualization while setting ScrollViewer.CanContentScroll to false.
Park Wu
  • 371
  • 1
  • 3
  • 3
31
votes
5 answers

Listview inside of scrollviewer prevents scrollviewer scroll

I have a scrollviewer with a couple listboxes in it. The problem is if a user uses the middle mouse roller to scroll the scrollviewer while their mouse is over a listview. The listview scrolls its internal scrollviewer to the bottom and then…
ConditionRacer
  • 4,418
  • 6
  • 45
  • 67
31
votes
2 answers

How to find that ScrollViewer is scrolled to the end in WPF?

I have a ScrollViewer instance in my custom control... I need the requirement that whether scorollview is scrolled to the End? Is there any way?
David Bekham
  • 2,175
  • 3
  • 27
  • 56
28
votes
2 answers

How to find Vertical Scrollbar width of a Scrollviewer in C#

I have a ScrollViewer and in that I am showing the Vertical Scrollbar, Now on changing resolution of the system I want to get the width of the scrollbar. I went through One StackOverflow Post there they mention to check for…
user701677
26
votes
4 answers

How to control the scroll position of a ListBox in a MVVM WPF app

I have got a big ListBox with vertical scrolling enabled, my MVVM has New and Edit ICommands. I am adding new item to the end of the collection but I want the scrollbar also to auto position to the End when I call my MVVM-AddCommand. I am also…
Jobi Joy
  • 49,102
  • 20
  • 108
  • 119
1
2 3
79 80