When I click in a ToolWindow(anywhere),the ToolWindow will be actived and change the current layout to show itself completely,however ,I do not want it to do so.Then how can I solve it?
When I click in a ToolWindow(anywhere),the ToolWindow will be actived and change the current layout to show itself completely,however ,I do not want it to do so.Then how can I solve it?
Hello, can you tell us exactly how to repro what you see from within our samples? Sorry but I'm not quite sure what you are referring to. Thanks!
<Window x:Class="ScrollBarWithActiPro.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
Title="MainWindow" Height="150">
<StackPanel>
<ScrollViewer Height="100">
<docking:DockSite
CanToolWindowsAttach="False"
CanToolWindowsRaft="False"
CanToolWindowsClose="False"
CanToolWindowsAutoHide="False"
ToolWindowsHaveTitleBars="False"
ToolWindowsHaveOptions="False"
Height="300"
>
<docking:SplitContainer Orientation="Vertical">
<docking:ToolWindowContainer>
<docking:ToolWindow>
<Rectangle Height="100"></Rectangle>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow>
<Rectangle Height="100" Fill="Black"></Rectangle>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow>
<Rectangle Height="100" Fill="Red"></Rectangle>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:SplitContainer>
</docking:DockSite>
</ScrollViewer>
</StackPanel>
</Window>
When the screen is half white rectangle and half black rectangle , you click the black , then , the black rectangle [ToolWindow.Active()] event will be raised , and the scroll bar will scroll , and the position of the black rectangle will move above.
It's not correct.So can you help me solve it?
Hello, it seems like the problem here is described pretty well in this StackOverflow post:
Basically you'd need to handle the RequestBringIntoView event somewhere before the ScrollViewer gets it. So add a handler to DockSite.RequestBringIntoView and set e.Handled there. I think that will do the trick.
It works ~ thanks
Please log in to a validated account to post comments.