scrollviewer

WPF ScrollViewer Elastic Effect

I want to build a custom ScrollViewer control, based on the original ScrollViewer of WPF actually, and I wanted to add an elastic effect to it! I tried methods like ScrollToVerticalOffset() but they won't go beyond the scrollable content of the ScrollViewer! I don't know how to exactly emulate the elastic effect (which is when you reach ...

C#/WPF: Scroll to last line in DataGrid/ListView etc. / Problem with ScrollViewer

Hello, I'm trying to scroll to the last line in my DataGrid. This is what I'm using right now: var border = VisualTreeHelper.GetChild(mainDataGrid, 0) as Decorator; if (border != null) { var scroll = border.Child as ScrollViewer; if (scroll != null) scroll.ScrollToEnd()...

wpf - how can I hit test the scrollbars in the scrollviewer?

Hi, Can someone please tell me how to hit test the scrollbars of a scrollviewer in WPF? Thanks, Andy <Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <StackPanel> ...

Zoom/scroll to cursor

I have a problem when zooming in/out of an image within a scrollviewer. When i use the zoom-in button i use a double animation for the image width/height to 1.25 of its original size each time the button is clicked. The same goes for the zoom-out button which sets the scale factor to 0.75. So far so good. The problem is that based on wh...

How to know when an ItemsControl has overflowed its ScrollViewer?

How would one swap a template by using a Trigger when the items within an ItemsControl overflow its container? In my current implementation I would like to show a more brief form of template based on whether the current state of the ItemsControl are such that the content would cause a ScrollViwer's scroll bars to appear if the scroll ba...

Triggers on ScrollViewer child controls

I have a the following code for a ScrollViewer in my Silverlight app. The BasketSymbolsView control contains controls that have custom double click triggers applied to them. For some reason the ScrollViewer is preventing the child controls from triggering an action when I double click the BasketSymbolsView controls. <ScrollViewer x:Na...

ItemsControl, VirtualizingStackPanel and ScrollViewer height

I want to display a important list of items using an ItemsControl. The reason why I'm using an ItemsControl is that the DataTemplate is much more complex in the application I'm working on: The sample code provided only reflects the sizing problem I have. I would like : the ItemsControl to be virtualized because there is many items to...

Triggering on a ScrollViewer's scroll bar visibility (WPF)

Is it possible to create a Trigger that is triggered based on a ScrollViewer's scroll bar visibility? I have a ScrollViewer with its VerticalScrollBarVisibility set to Auto and I want to change some of the ScrollViewer's properties only when the scroll bar is actually visible. Something like this: <ScrollViewer VerticalScrollBarVisibil...

Working with an AdornedElementPlaceholder in a ScrollViewer in WPF

Hi If I put a large text box which has has a data binding validation error into a ScrollViewer, the red border which is shown around the text box only includes its visible parts as if it would not be scrolled. Example: Window1.xaml: <Window x:Class="ErrorTemplateApplication.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/...

Wpf ScrollViewer Scroll Amount

Is it possible to change the amount that the WPF ScrollViewer scrolls? I am simply wondering if it's possible to change the scrollviewer so that when using the mouse wheel or the scrollviewer arrows, the amount of incremental scrolling can be changed. ...

XAML ScrollViewer scroll bar hidden issue (Silverlight)

I’ve got this strange problem whereby the content within a scroll viewer increases in size, the scroll viewer then shows is horizontal scroll bar. However the grid the ScrollViewer is ultimately within doesn’t seem to resize enough to show the scroll bar. I’ve isolated the problem in this sample app, basically some xaml and some code be...

How to disable ScrollViewer in ListBox?

I have a ListBox. It has internal ScrollViewer, so I can scroll ListBox content with mouse wheel. It works fine until I set item template that contains another ListBox (in fact, I have 4 nested ListBoxes =)). Problem is that internal ListBox's ScrollViewer steals wheeling event. Is there any easy way to prevent this behavior? I had Li...

Silverlight 3 missing ScrollViewer.ScrollChanged event workaround?

I want to be notified of changes to the VerticalOffset of the vertical scrollbar of a ScrollViewer. In WPF there is a ScrollViewer.ScrollChanged event, but in Silverlight 3 this is missing. Does anyone know a workaround? ...

How to add a button or image to a vertical table header of scrollview ?

I have seen a lot of programs had some buttons or images in the vertical or horizontal scrollview table header or bottom and click it to invloke some events, But I have searched interface builder library and not found some widget I can used , how these programs to implement it ? Thank you very much! ...

Listbox Scrollbar does not resize properly when delete item from the bottom of list.

I have a standard listbox. I can add items using a input textbox. I can delete them using delete key or context menu. When i delete the items from top of the list, scrollbar resizes properly. If i scroll to the bottom and then delete items the scrollbar resizes incorrectly i.e instead of increasing in size it decreases in size. If i scro...

WPF - ScrollView Confusion

I am new to WPF and the ScrollViewer is frustrating me. Either I just don't "get" it, or it is a limited control. Here are my Frustrations: Bad Horizontal Scrolling The horizontal scroll bar is only visible at the bottom of the list (I have to scroll to the bottom to see it) Bad Borders I have a ListBox in my ScrollViewer. When I st...

How can I get my ScrollViewer to scroll the view area?

I have a Grid inside a ScrollViewer inside a Border inside a StackPanel inside a Window. The ScrollViewer puts a scrollbar on the right, but it is not scrollable. How can I get the ScrollViewer to make its contents scrollable? <Window x:Class="TestScroll234343.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presenta...

After rebinding Silverlight Listbox control how do you get it listbox to scroll to back to the top?

I have a silverlight listbox that is being used as a search result box. I'm using dynamic searching (keyups in the search box cause the events to fire to filter this list box's contents). The issue I'm running into is if the user scrolls down when the box is unfiltered, then does the search, the rebinding of the listbox does not cause t...

Scrollviewer edge blur effect, opacitymask not working properly

Hi there, I want to create a custom scrollviewer control for a touch screen application without using scrollbars. To accomplish letting the users know that they can scroll the content, I am fading the bottom and top part of the scrollviewer with a linear gradient using an opacitymask. This all works fine, except for a problem with the o...

[WPF] Lock the scrolling in a ScrollViewer ?

Hi, How can I lock vertical scrolling of a ScrollViewer by using the mouse wheel ? ...