scrollviewer

Scrolling to selected Treeviewitem within a scrollview.

I have a scrollviewer wrapping a treeview. I populate the treeview programmatically (it is not bound), and expand the treeview to a predetermined treeviewitem. That all works fine. My problem is that when the tree expands I would like the scrollview that parents the treeview to scroll to the treeviewitem that I just expanded. Any...

Can't fully style a ListBox/Scrollviewer in WPF

I'm using custom Scrollbars we created using standard ControlTemplates, however when I apply them to a ListBox there is a corner in the bottom right which I am unable to find any way to override. Unfortunately I can't post a picture until I get more points. But the corner I'm referring to is when both a vertical and horizontal scrollbar...

KeyUp event is not fired with ScrollViewer

I am using Syncfusion's TreeViewAdv control. I attach a KeypUp event handler to it and it worked as expected. The event is fired whenever I released a key. However, once I wrap it in a ScrollViewer, the event is not fired. I have to move the event handler up to the ScrollViewer itself to catch the event. I aslo checked the PreviewKeyUp e...

C# WPF - Global ScrollViewer Mode

I have made some custom attached properties that enable me to create a "pop out" effect on any control. It animates the width and/or height when a boolean DependencyProperty is toggled. Is there a good way to set all ScrollViewer's scrollbar visibility inside the control to hidden during this effect? You can see some ugly scrollbars a...

C# WPF - ScrollViewer + TextBlock troubles

I have a TextBlock within a ScrollViewer that aligns with stretch to its window. I need the TextBlock to behave as the following: Resizes with window, no scrollbars When resized below a certain width the TextBlock needs to keep a MinWidth and scrollbars should appear TextWrapping or TextTrimming should work appropriately How can I ...

Silverlight ScrollViewer initial horizontaloffset

Hi, I have a question regarding the setting of the HorizontalOffset-property (using the ScrollToHorizontalOffset method). Upon starting my application, the content for the scrollviewer is dynamically created (i.e. I do not know its extent during design-time). I then want to set the horizontal offset of the scrollviewer control, howev...

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 VerticalScrollbarVisibility is set to "Visible" instead of "Auto"). Any idea on how to solve this? Th...

(VB.NET + WPF) Drag + Drop (to allow user sorting) of stackpanel elements within a Scrollviewer?

I have good model (I think!) for how to allow a user to drag an element in a stackpanel and reposition it to another location within the stackpanel. However, my Stackpanel is placed within a ScrollViewer, like this (generalized): <ScrollViewer> <StackPanel> ....First item ....Second item ....Third item ...

How to get a ScrollViewer to be an exact height *and* show both scrollbars at all times?

I have a DataGrid inside a ScrollViewer. I want the whole thing to only be 200 pixels high. But this code: <ScrollViewer x:Name="DataGridArea" Height="200"> <toolkit:DataGrid ItemsSource="{Binding FieldChanges}"/> </ScrollViewer> produces this with the scrollbar only on the right side: and I can only see the scrollbar when I ...

Wpf TreeView's ScrollViewer Adjustment

I am using a Wpf TreeView, in which I am adding nodes at runtime. Some times tree goes bigger and ScrollViewer comes into picture(that is part of TreeView's ControlTemplate). But everytime I add a node, I can not see it, cos it is outside the page area, I need to drag the vertical ScrollBar's thumb down in order to see it. so I want the ...

android scroll view of linearlayouts

hello guys, sorry for constant questions. i would like to ask if doing smth like this is possible on android: Scrollview of layouts, and each layout in horizontal orientation contains button, another button and checkbox. e.g: button1, button2, checkbox button1, button2, checkbox ......... button1, button2, checkbox th...

Why WPF ScrollViewer Language is tr but ContextMenu command texts are in English ?

Hello, I have a ScrollViewer in WPF. when I make right click to scroll control, context menu is opening and write commands like "Scroll Here, "Scroll Top" vs. vs. although my ScrollViwer Language is "tr-Tr" , Why Scrollviewer ContextMenu command texts are in English ? ...

WPF ScrollViewer in other controls

Hi, When I have a control like a WPF Treeview, Naturally when the contents of that treeview exceed the maximum height or width a scroll appears. Is there a way to obtain that scroll to move it or disable it? Thanks ...

How to stop a WPF Listbox from scrolling

I want my listbox to never scroll. It's easy to just hide/disable the scrollbars, but mousewheel/arrow keys still cause a scroll when the items in the ListBox exceed its boundaries. There HAS to be some way to tell the ListBox that it just can't ever scroll....right? ...

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 making an item editable(By calling EditCommand with a particular row item) from some other part...

WPF detect scrolling parent Control

Imagine the situation you open a WPF Popup(e.g. through ButtonClick). You have a ListBox directly in the Popup with some items, so you have to be able to scroll. Imagine that this is your Custom Control and it's located in the ScrollViewer. Now if you move with your mouse outside from the Popup surface and scroll, what happens? You scro...

How do I incorporate speed and/or acceleration into a (WPF) scrollviewer?

I have a WPF scrollViewer that I use for panning (MouseDown, MouseMove, MouseUp) and I would like to include an acceleration effect that incorporates inertia. So, if the mouse moves beyond a threshold speed and I release the mouse, it continues to pan but slows down as a function of the initial speed. Any ideas, thoughts or examples? ...

WPF scrollbar for a resizable window

This should be a very simple task, but for some reason I'm running into a lot of problems with it in WPF. This is what I want to happen: I have a bunch of controls in a window, including expander controls. I want to have scroll bars for that window, when content expands below the visible area. Also, the window is not of fixed width, it ...

Need help with scrolling to a percentage of richtextbox's maximum scroll amount (the richtextbox is in a scrollviewer).

I am trying to make it so that a user can ctrl-click outside of a richtextbox to scroll to a percentage of the richtextbox's maximum scroll amount based on the y.position of the mouse relative to the top of the richtextbox. Here's the code I'm currently using: private void MainWindow_PreviewMouseLeftButtonUp(object sender, MouseButt...

VerticalScrollBar Visibility Settings not Applied Correctly for Silverlight PasswordBox

I have the following Style settings for a Silverlight PasswordBox: <Style x:Key="s_DefaultPasswordBoxStyle" TargetType="PasswordBox"> <Setter Property="Margin" Value="0,0,30,0"/> <Setter Property="BorderThickness" Value="1"/> <Setter Property="Background" Value="{StaticResource TitleBarForeSolidColorBrush}"/> <Setter Property="F...