scrollviewer

How can make ScrollViewer scroll when mouse is over *any* content

荒凉一梦 提交于 2019-12-06 02:16:40
问题 The reason I stress 'any' is because CanContentScroll is not fully working in my ScollViewer . Let me explain the scenario: I have a ScrollViewer that has three Labels followed by a ListBox each. The reason I have this content inside the ScrollViewer is because I don't want each ListBox to have a ScrollBar , I just want one "global" ScrollBar . The problem is that when the cursor is over the the ListBox the ScrollViewer doesn't scroll. I've tried to set CanContentScroll property to true in

Putting ListBox in ScrollViewer: mouse wheel does not work

扶醉桌前 提交于 2019-12-05 22:50:02
问题 My mouse wheel does not work when putting a ListBox in a ScrollViewer . Does the ListBox somehow "steal" this event? <ScrollViewer VerticalScrollBarVisibility="Auto" Style="{StaticResource myStyle}"> <ListBox> <ListBoxItem>Test 1</ListBoxItem> <ListBoxItem>Test 2</ListBoxItem> <ListBoxItem>Test 3</ListBoxItem> <ListBoxItem>Test 4</ListBoxItem> <ListBoxItem>Test 5</ListBoxItem> <ListBoxItem>Test 6</ListBoxItem> <ListBoxItem>Test 7</ListBoxItem> </ListBox> </ScrollViewer> Edit: as requested by

Tooltip on scrollviewer in documentviewer in case of deferred scrolling

a 夏天 提交于 2019-12-05 20:00:42
I want to show the tooltip on my scrollviewer on page scrolling which shows the current page number in it which i asked here- Tooltip on scrollviewer in documentviewer . I have implemented the answer after making some changes in the proposed solution but i face some problem. If i write this in my scroll_changed event if (Mouse.LeftButton == MouseButtonState.Pressed) it works perfectly fine but if i have a deferred scrolling enabled on my custom document viewer, the popup(tooltip) never appears..:( Is there any workaround for it?? 来源: https://stackoverflow.com/questions/5831514/tooltip-on

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

半城伤御伤魂 提交于 2019-12-05 18:25:22
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 the scroll to go back up to the top making the results look like there is only one value in it. the code I have so far for the listbox is this (This is a simplified version): XAML: <Grid x:Name="MainGrid" Rows="2"> <StackPanel Orientation="Horizontal" Grid.Row="0

Windows Phone: how to disable touch scrolling in ScrollViewer (Listbox)?

久未见 提交于 2019-12-05 17:45:58
i have a scrollviewer with a listbox inside: i need to disable the vertical scroll by touch, how can i? In other words, the user can't scroll with the touch (i have put buttons, but this is another story). <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" x:Name="imagesScrollview" Width="480" Height="595" Margin="0,112,0,63"> <ScrollViewer.RenderTransform> <CompositeTransform/> </ScrollViewer.RenderTransform> <ListBox Name="listavideo" Height="595" Width="480"> <ListBox.ItemTemplate> <DataTemplate> <Button Width="470" Height="146" Background="White"

C# wpf scrollviewer not working like windows store app

别说谁变了你拦得住时间么 提交于 2019-12-05 16:47:55
I'm currently working on an application using WPF. And I can't but help to notice the difference in ScrollViewer functionality compared to the Windows Store App variant. When I'm at the edge of the screen and the edge of a ScrollViewer and I want to slide so that I'd move away from the edge. I see the windows desktop or menubar (when at the bottom of the screen). Is there a solution to prevent this scroll behaviour from happening? It is rather annoying (and ugly!) when your scrolling till the edge of the screen and then get bumped back and see a bit of the windows platform underneath. This

Windows phone 7 scrollviewer problem

我是研究僧i 提交于 2019-12-05 16:09:31
问题 I am not able to scroll through the page in wp7 . eventhough i have added scrollview it still doesnt work. <phone:PhoneApplicationPage xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas

How to put image “placemarkers” inside a scrollbar in WPF?

和自甴很熟 提交于 2019-12-05 15:27:47
问题 I have a long Scroll Viewer and I want to mark important spots with small images on the scroll bar. If the the image is clicked the scroll bar will jump to the corresponding content. I've seen this functionality in a few applications such as Eclipse and Chrome and was wondering how to reproduce it with WPF. 回答1: Short answer is "change the template of the ScrollBar". Long answer is... That I would add an ItemsControl in the template of the ScrollBar control. I would put this ItemsControl on

Listview inside of scrollviewer prevents scrollviewer scroll

徘徊边缘 提交于 2019-12-05 10:03:27
问题 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 continues to capture the mouse, preventing the containing scrollviewer from scrolling. Any ideas on how to handle this? 回答1: That happens because the ListView 's ( ListBox 's, actually) content template wraps its items with a ScrollViewer by itself. The

Mouse wheel not working when over ScrollViewer's child controls

我的梦境 提交于 2019-12-05 03:34:31
I was kind of expecting my ScrollViewer's child controls to hand the MouseWheel events back up the the ScrollViewer automatically, and that's not the case. I have a ScrollViewer with a ListBox in it. If I manually resize the width of the ListBox to be less than the ScrollViewer, the MouseWheel works on all of the ScrollViewer but has no effect when the mouse is positioned above the ListBox. What's the standard way to do this? Do I put an event trigger on the ListBox that fires the event on the parent? Do I handle and reroute the event in the code behind? Kent Boogaart The ListBox 's template