scrollviewer

Scrollviewer and ItemsControl VerticalScrolling into nirvana

别等时光非礼了梦想. 提交于 2020-01-17 08:00:11
问题 Hi i've got a complex ItemsControl wich is used to display news (variable height!) with a slide/fade in effect. (like google currents) my problem now is that the scrollviewer will calculate the available scrollingsize left based on whatever.. that will end up in a very ugly way of scrolling if the user scrolls fast! sometimes the scrollview scrolls into the nirvana. i thought this might be the cause of virtualization but i'm not able to deactivate it. as you can see i ve already replaced the

Scrollviewer and ItemsControl VerticalScrolling into nirvana

天涯浪子 提交于 2020-01-17 07:59:29
问题 Hi i've got a complex ItemsControl wich is used to display news (variable height!) with a slide/fade in effect. (like google currents) my problem now is that the scrollviewer will calculate the available scrollingsize left based on whatever.. that will end up in a very ugly way of scrolling if the user scrolls fast! sometimes the scrollview scrolls into the nirvana. i thought this might be the cause of virtualization but i'm not able to deactivate it. as you can see i ve already replaced the

Scrollviewer logical scrolling with itemscontrol

送分小仙女□ 提交于 2020-01-15 23:25:46
问题 In a WPF app I have a ScrollViewer, in which is an ItemsControl, the items of which are databound to a collection, and I have a template specified for the items. I want the ScrollViewer to use logical scrolling, so I set the ScrollViewer.CanContentScroll="True" flag, and set the ItemsPanel template of the ItemsControl to be a StackPanel. However, the scrolling is still physical rather than logical. What am I doing wrong? Thanks Tom 回答1: Sorry for the late reply... This is something that

MatrixTransform in combination with Width/Height of a Canvas

扶醉桌前 提交于 2020-01-15 10:34:28
问题 When zooming in on a drawing on a Canvas I have the requirement to show scrollbars. The Canvas is in a ScrollViewer and I increase the Width/Height of the Canvas so that that the scollbars appear (otherwise they don't). To zoom in with a factor of 1.1 I use this code: Matrix m = this.LayoutTransform.Value; if (e.Delta > 0) f = 1.1; else f = 1.0 / 1.1; m.Scale(f, f); this.LayoutTransform = new MatrixTransform(m); this.Height = this.ActualHeight * f; this.Width = this.ActualWidth * f; It turns

MatrixTransform in combination with Width/Height of a Canvas

拟墨画扇 提交于 2020-01-15 10:33:20
问题 When zooming in on a drawing on a Canvas I have the requirement to show scrollbars. The Canvas is in a ScrollViewer and I increase the Width/Height of the Canvas so that that the scollbars appear (otherwise they don't). To zoom in with a factor of 1.1 I use this code: Matrix m = this.LayoutTransform.Value; if (e.Delta > 0) f = 1.1; else f = 1.0 / 1.1; m.Scale(f, f); this.LayoutTransform = new MatrixTransform(m); this.Height = this.ActualHeight * f; this.Width = this.ActualWidth * f; It turns

Moving Object in ScrollViewer

本小妞迷上赌 提交于 2020-01-15 08:00:56
问题 I'm using the MVVM setup, for my app and I'm using an scrollViewer to scroll around an map. On this map I have an unit which I'd like to move around when I select it. However when I select the unit my ScrollViewer is still activated, is there an way to work around the scrollViewer or deactivate it such that I can move the unit around. I already tried changing the ManipulationModeProperty to Control, but thius makes the unit lag when I move it around. My ScrollViewer is: <ScrollViewer Width=

Child elements of scrollviewer preventing scrolling with mouse wheel?

六月ゝ 毕业季﹏ 提交于 2020-01-09 04:38:08
问题 I'm having a problem getting mouse wheel scrolling to work in the following XAML, which I have simplified for clarity: <ScrollViewer HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" CanContentScroll="False" > <Grid MouseDown="Editor_MouseDown" MouseUp="Editor_MouseUp" MouseMove="Editor_MouseMove" Focusable="False" > <Grid.Resources> <DataTemplate DataType="{x:Type local:DataFieldModel}" > <Grid Margin="0,2,2,2" > <TextBox Cursor="IBeam" MouseDown="TextBox

How to listen to the scrolling event of scrollviewer in windows phone 8?

大憨熊 提交于 2020-01-06 04:18:45
问题 I have developed for windows 8/8.1. Its scrollviewer generates events while scrolling like - ViewChanging/ViewChanged. I couldn't find any such event for scrollviewer in windows phone 8. How can i listen to when the scrollviewer is scrolling in WP8? I am trying to look for method similar to -ScrollViewDidScroll() of iOS development. 回答1: Have tried to use this event? - ScrollViewer.ViewChanged event 回答2: If you are using a ScrollViewer, or a ListBox you can listen to the LayoutUpdated event

Click and drag scrolling using ScrollViewer

本小妞迷上赌 提交于 2020-01-04 18:34:19
问题 I would like to allow click and drag scrolling using a ScrollViewer (i.e. click anywhere in the ScrollViewer and drag up or down, and it will scroll accordingly) I have a StackPanel nested inside a ScrollViewer and I already have the scrolling working. I believe I saw that answer somewhere, but I can't seem to find it anymore. This has to be done using code only. 回答1: Look at this code from Matt Hamilton: public class TouchScrolling : DependencyObject { public static bool GetIsEnabled

Linking only vertical offset of two scrollviewers

独自空忆成欢 提交于 2020-01-03 01:20:06
问题 I have a scrollview with a big grid containing two smaller grids. the grids are supposed to scroll together vertically, but only the right grid should scroll horizontally. This is because the information in the left grid is needed as a reference while the right grid can contain 100+ columns. I have already tried putting the grids in separate scrollviews and linking them with an eventhandler. But I didn't find any code to do this in a Windows 8.1 application. Is there any way to do this for