简体   繁体   中英

WPF scrollviewer on dock panel does not scroll mousescroll

I have an application that works with different tabs. At left side I have my menu and at the middle I have DockPanel. According to menu selection I am adding a windowbase window as child to my dock panel and with mouse ball scroll but it does not scroll. Normally when you are over scrollviewer area it automatically triggers scrolling but for dock panel its just moving when I am over scroll bar not on whole dock panel.

Thanks guys I was thinking that when I add scrollviewer into the DockPanel and clear children than the scrollvier also be removed. But it is not like that.At the beggining I was using it like following code

<ScrollViewer x:Name="innerScrool" VerticalScrollBarVisibility="Auto" VerticalAlignment="Top" MinHeight="350"><DockPanel Margin="0,10,0,0" VerticalAlignment="Top" x:Name="ControlPanelContent">       


But I change the code take the scrollviewr inside and the problem solved.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM