scrollviewer

XAML: make a ScrollViewer show scrollbars when the ScaleTransform of a child object gets big

Hi. I am making a sort of "print preview" control for some documents in my Silverlight 3 application. I have a Canvas (for showing the document) inside of a ScrollViewer, and I have zoom in / zoom out buttons that control the X and Y Scale properties of the ScaleTransform for the Canvas.RenderTransform property. I want the scrollbars ...

WPF Listbox wont scroll Vertical

Hi, Within a Groupbox I have a Listbox, ListboxItems are defined in the XAML as well. The Listbox is defined: <ListBox Name="lvAvoidCountry" Margin="5,5,5,5" Background="Transparent" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Disabled" > Items are defined like this: ...

Silverlight ItemsControl vertical scrollbar, using a wrappanel as ControlTemplate

I have a collection of elements, each one with a name and a subcollection of image blobs. I want to display an Accordion, with each item representing each of the MainElements. inside each element, I display the images in the subcollecion of said MainElement. The Accordion gets resized by the user, so I use a wrappanel for presenting the ...

WPF ListView ScrollViewer Double-Click Event

Doing the below will reproduce my problem: New WPF Project Add ListView Name the listview: x:Name="lvList" Add enough ListViewItems to the ListView to fill the list completely so a vertical scroll-bar appears during run-time. Put this code in the lvList.MouseDoubleClick event Debug.Print("Double-Click happened") Run the application...

New TabItem Content ActualHeight crashes Xaml Window

I am able to create new TabItems with Content dynamically to a new window by streaming the Xaml with XamlReader: NewWindow newWindow = new NewWindow(); newWindow.Show(); TabControl myTabCntrol = newWindow.FindName("GBtabControl") as TabControl; StringReader stringReader = new StringReader(XamlGrid); XmlReader xmlReader =...

How to calculate full height of a scroll viewer

Hi, I am using a scroll viewer in my xaml page. When i display lot of entries in this viewer it starts showing a scroll bar which is fine and desirable. But while exporting that page in jpeg format i need to show all entries in one image. Hence i am planning to increase its size just enough to make scroll bar disappear. Chalange i am fac...

How to loop through controls within TabItem

Hi, I'd like to loop through the controls within a TabItem. my xaml is something like TabControl TabItem ScrollViewer Grid I have tried TabItem ti = TabControl.Selected as TabItem foreach (UIElement control in ti) ... Which causes an error Basically I would like to get to the ScrollViewer Content or Grid Any ideas??...

WPF window scrolling with top menu

I'm running into a dilemma. When I make the ScrollViewer the main content object of my window, scrolling behaves exactly like I want it to. You resize to make it smaller than the content and the window and scroll bars appear. The problem comes in when I want the to menu to be static and the rest of content to be scrollable. I want the sc...

how to create a 2D grid of images in wpf that is scrollable vertically and horizontally?

I want to create a grid of images with say 10 images in a row, 10 in the next row and so on.. Also I want to use virtualizing stack panel to render only visible images. Whenever I try to use a listbox in a stackpanel I get either a horizontal or vertical alignment. How should I go about it? ...

WPF Animation on scrollviewer children clipped by scrollviewer

Hey folks, I'm hoping I have a fairly simple problem that can be fixed easily as it seems like I'm just missing something basic from the WPF world. I have a scrollviewer wrapping a stackpanel which contains several images, these images have animations to increasing in size when the mouse passes over them. All works fine without the scrol...

WPF - Animate ListBox.ScrollViewer.HorizontalOffset?

WPF - Animate ListBox.ScrollViewer.HorizontalOffset Has anybody got a complete solution to animating the listboxitem position on some event Cheers Nick ...

wpf scrollviewer scrolltoverticaloffset

The events scrolltoVerticalOffset or the scrolltoHorizontalOffset do not change the values of the scrollviewer. Please tell me at which event does the values HorizontalOffset and the VerticalOffset get changed? I have tried LayoutUpdated() method but it goes in a infinite loop. Thanks in advance ...

WPF scrollview scrolled to the bottom default

I have a scrollview containing a ListBox. I would like the scrollview to scroll all the way to the bottom by default when the view has been loaded! This because the most recent element is always the last element in the ListBox. Is there an easy way to achieve this behavior? Thanks ...

Scrollable Grid in WPF/Silverlight

I would like to build a WPF window which uses an outer Grid to split the screen into 4 parts. In the lower right quadrant, I would like to embed another Grid which is larger than the grid cell. I have been looking for ways to add a ScrollViewer (or use the Grid.ScrollViewer properties) but no matter what I try the inner grid does not res...

Silverlight Textbox scrollviewer problem

In silverlight, I got a textbox which I want to be multiline and have mousescrolling available. If I only use textbox then I dont have mousescrolling. If I use a scrollviewer I will have mousescrolling. BUT everytime my writing exceeds the rows that are shown from start the text and caret just dissapears without the scrollviewer doing...

Help needed on ScrollViewer styles

Hi, Can any body please provide me, how can we made custom template for the ScrollViewer. Pointers to any simple tutorials will be greatly appreciated. Thanks, -Narendra ...

Determine the width of the vertical scroll bar in a ScrollViewer

I'm using a ScrollViewer to display an Image. The Image has a ScaleTransform set as one of it's LayoutTransforms. I've got it setup to fit the width of the image into the ActualSize of the ScrollViewer. My problem is that if the image height requires the vertical scrollbar to be present (I have it set to Auto) then my image is scaled ...

ScrollViewer in a ListBox not working. WPF.

Hi, I have the following defined in my control: <Style TargetType="primitives:CalendarDayButton" x:Key="EventCalendarDayButton"> <Setter Property="Background" Value="#FFBADDE9"/> <Setter Property="MinWidth" Value="5"/> <Setter Property="MinHeight" Value="5"/> <Setter Property="FontSize"> <Sett...

ScrollViewr around expanders not scrolling automatically when expander is expanded - silverlight 3

I have several expanders inside a ScrollViewer in a fixed sized ChildWindow. The problem is when each expander expanded,the scroll will not scrolling down automatically and as a result,some of the items in the bottom will get hidden and we have to manually scroll down to see them. I saw some posts like the following link but I guess my s...

Race Condition Occuring in ScrollViewer

This might be a design problem on my part but I'm experiencing what I'm calling race conditions when setting the size of a Canvas (let's call it Canvas A) which is a child of a ScrollViewer. I'm using the size of Canvas A to set the visibility of the scrollbars in the ScrollViewer. However, I also use the visibility of the scrollbars t...