tags:

views:

998

answers:

2

when putting a ScrollViewer inside a window(not keeping all the window's size) inside the ScrollViewer there's (with other stuff) a WinFormsHost and a control inside (let's say a DateTimePicker). when scrolling, the inner winforms control keeps being visible when there's no longer a reason (it's outside of the scrolling region), so it "floats" above what's outside of the ScrollViewer

any solutions for that?

+2  A: 

According to this msdn link

WindowsFormsHost elements are always drawn on top of other WPF elements, and they are unaffected by z-order

I don't think there's an easy solution. You might want to consider having the windows forms control handle the scrolling itself instead of using WPF's ScrollViewer.

Hovito
A: 

Just add in ScrollViewer control property:

VerticalScrollBarVisibility="Auto"

and set Height to Your max height. That's all.

Kamilos