scrollviewer

How to enable horizontal scrolling with mouse?

本秂侑毒 提交于 2019-12-02 20:41:41
I cannot determine how to scroll horizontally using the mouse wheel. Vertical scrolling works well automatically, but I need to scroll my content horizontally. My code looks like this: <ListBox x:Name="receiptList" Margin="5,0" Grid.Row="1" ItemTemplate="{StaticResource receiptListItemDataTemplate}" ItemsSource="{Binding OpenReceipts}" ScrollViewer.VerticalScrollBarVisibility="Disabled"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <StackPanel Orientation="Horizontal" ScrollViewer.HorizontalScrollBarVisibility="Visible"/> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> </ListBox> My item

Datagrid - Scrolling will crop images horizontally instead of vertically

时间秒杀一切 提交于 2019-12-02 14:18:36
问题 I needed to invert Columns/Rows on my DataGrid (see WPF horizontal DataGrid and RotatedDataGrid) Once I inverted it, I am having some weird effects on the images displayed inside my datagrid. When I scroll down, the column 1 will crop the image by the left and a little on the right. The more I go down, the more it crops the left until there is nothing more. How can I solve that ? Here a full simple example if you want to test it (you just need to copy/paste it in a new project and scroll down

Datagrid - Scrolling will crop images horizontally instead of vertically

断了今生、忘了曾经 提交于 2019-12-02 08:59:17
I needed to invert Columns/Rows on my DataGrid (see WPF horizontal DataGrid and RotatedDataGrid ) Once I inverted it, I am having some weird effects on the images displayed inside my datagrid. When I scroll down, the column 1 will crop the image by the left and a little on the right. The more I go down, the more it crops the left until there is nothing more. How can I solve that ? Here a full simple example if you want to test it (you just need to copy/paste it in a new project and scroll down to see the problem) MainWindows.xaml <Window x:Class="RotatedDataGrid.MainWindow" xmlns="http:/

Consolidated Scrolling - “Pixel by Pixel” + “Item by Item”

落花浮王杯 提交于 2019-12-02 08:23:49
问题 I've a Drag-Drop framework in which scrolling support is already there (Pixel by Pixel scrolling). This works good in case Virtualization is not enabled but if it is enabled then it gets messed up. As the logic of scrolling is based on Viewport height and as per MSDN we've - MSDN- If CanContentScroll is true, the values of the ExtentHeight, ScrollableHeight, ViewportHeight, and VerticalOffset properties are number of items. If CanContentScroll is false, the values of these properties are

Pivot inside a ScrollViewer, scrollviewer wont scroll

北战南征 提交于 2019-12-02 06:48:38
问题 I have a page that has many UI elements and its scrollable vertical like a Timeline. In the middle I have a pivot that when its gets focus or the mouse pointer enters the scrollviewer stop scrolling. <ScrollViewer x:Name="scrollViewer" VerticalScrollMode="Enabled" HorizontalScrollMode="Disabled"> <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Grid.RowDefinitions> <RowDefinition Height="90"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition

WPF: Get an event on the scrollbar from Scrollviewer

空扰寡人 提交于 2019-12-02 05:43:54
I want get an event only if I the user drag the scrollbar left or right. When I use a MouseClick event, it contains the whole canvas too... I found that there is an Event Handler "ScrollChanged" but this is not really what I want because the width of my canvas grow every second by 10 and that cause 10 times per second the event ScrollChanged. I want just get an event by draging the scrollbar with the mouse <ScrollViewer x:Name="coordinateScroll" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Margin="75,0,0,0" Width="1125" Height="750" Background="Transparent"

Consolidated Scrolling - “Pixel by Pixel” + “Item by Item”

一笑奈何 提交于 2019-12-02 05:02:40
I've a Drag-Drop framework in which scrolling support is already there (Pixel by Pixel scrolling). This works good in case Virtualization is not enabled but if it is enabled then it gets messed up. As the logic of scrolling is based on Viewport height and as per MSDN we've - MSDN- If CanContentScroll is true, the values of the ExtentHeight, ScrollableHeight, ViewportHeight, and VerticalOffset properties are number of items. If CanContentScroll is false, the values of these properties are Device Independent Pixels. Also If Virtualization is Enabled then ExtentHeight Represents - TotalNumber of

VirtualizingStackPanel stops working when overriding the default control template for ScrollViewer

老子叫甜甜 提交于 2019-12-02 02:39:10
I have a listbox with a lot of items which are expensive to render. However the VirtualizingStackPanel takes care of that by only rendering the visible items. I want to override the control template for ScrollViewer since the default one has grey rectangle between the horizontal and vertical scrollbar. I just copied the one provided by Microsoft ( ScrollViewer ControlTemplate Example ) which do not have the grey rectangle issue. This controltemplate however disables virtualization by giving the VirtualizingStackPanel endless height. That means that the VirtualizingStackPanel will render all

How to make scrollviewer scroll pixels not components (wpf)

与世无争的帅哥 提交于 2019-12-01 23:20:10
问题 I'm trying to make my scroll viewer scroll flawlessly, that is I have a scrollviewer and it contains a stackpanel , the stack panel contains a user-made user control. and they can increase or decrease dynamically at run time. the problem is, suppose i have only 2 user controls in my stack panel , the scroll viewer have only 2 levels of scrolling, so it scrolls a whole user control for each click or mouse-wheel movement. how can I change that? is it a property or there is a mistake in the

How to make scrollviewer scroll pixels not components (wpf)

白昼怎懂夜的黑 提交于 2019-12-01 22:25:37
I'm trying to make my scroll viewer scroll flawlessly, that is I have a scrollviewer and it contains a stackpanel , the stack panel contains a user-made user control. and they can increase or decrease dynamically at run time. the problem is, suppose i have only 2 user controls in my stack panel , the scroll viewer have only 2 levels of scrolling, so it scrolls a whole user control for each click or mouse-wheel movement. how can I change that? is it a property or there is a mistake in the design? here is the xaml code for it: <ScrollViewer HorizontalAlignment="Left" Height="420"