-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutoHide does not work with ScrollViewer #62
Comments
@Dirkster99 currently I dont why but if you have a control with a scrollviewer inside the controltemplate the autohide function no longer works. AvalonDock set the ActiveContent to the ToolWindow and then back to the DocumentPane if the Pane as a Scrollviewer as Content. you can see the problem if you change the FileViewTemplate. Set the Template to this: <bindLocal:PanesTemplateSelector.FileViewTemplate>
<DataTemplate>
<Grid>
<ListBox />
</Grid>
</DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate> the autohide function no longer works if you Change the template to this <bindLocal:PanesTemplateSelector.FileViewTemplate>
<DataTemplate>
<Grid>
<TextBlock></TextBlock>
</Grid>
</DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate> the Auto hide functions works as expected. an now add a scrollviewer <bindLocal:PanesTemplateSelector.FileViewTemplate>
<DataTemplate>
<Grid>
<ScrollViewer >
<TextBlock />
</ScrollViewer>
</Grid>
</DataTemplate>
</bindLocal:PanesTemplateSelector.FileViewTemplate> the function don't work anymore. |
Interesting... I will investigate this and get back to you when I have more ideas about this problem. Thanks for the analysis and useful description to verify the problem 👍 |
Hi, I've tried to verify your problem but I cannot find any special problem connected to a
But I cannot see any special I think it is acceptable to have tool window dissappear after clicking inside the documnt and moving the mouse. I know this not what VS does but I am not sure whether fixing this issue is worth the effort - we could try to look further into it, but your expectation is that the tool window dissappears after clicking inside the new document without having to move the mouse, right? |
Hi, I have made a recheck with my second reference project for AlavonDock Gemini. There it works like Visual Studio. One mouse click and the tool window disappears. I tried the same again as with your test project. With and without ScrollViewer and I came to the same result. Without it works, with ScrollViewer not. Since the demo program MonoGame also uses a ScrollViewer I thought the problem must be somewhere else. I commented out everything in the methods for Mouse-Down and Mouse-Up. Finally the line where the focus is set on the GraphicsControl remained. With this line it works without problems. So I think AvalonDock has a problem with the management of the Focus. Kind regards Martin |
Yes it looks like there is a focus problem but its not necessarily in AvalonDock alone - remember AvalonDock needs to set and steel focus from/to documents and tool window to activate things when user do Control+Tab - worse still, controls (views) are unloaded when they become invisible... My problem is that I cannot verify your problem since Gemini appears to be broken and your version is not public, is it? I even tried to update it myself but there was no response in ages... ... Maybe you can have a look at my reference App Edi where I use the: events to capture and restore the status of the document whenever the view is unloaded or (re-)loaded. I am not quit sure but your description sounds like this could be something useful to add to your control (?). You could also try adding something like
to your scrollviewer to see if that makes a difference. If it does, I am not sure what it means as I don't know your app but I know focus issues with AvalonDock from the past but I got these to work in Edi and I hope it helps you getting your app to work as well. Please let me know if you make any progress (even if trying things and failing) as I am wondering what the issue is and other might face similar problem when converting from AD 2.x to 3.x ... |
Closing this now since it seems to get stalled - feel free to re-open if you have any news that shed a light on this one... |
The AutoHide function does not work with controls that have a scrollviwer inside the controltemplate.
I have tested with MLibTest.
Step to reproduce:
The text was updated successfully, but these errors were encountered: