Comments (6)
@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.
from avalondock.
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 👍
from avalondock.
Hi,
I've tried to verify your problem but I cannot find any special problem connected to a ScrollViewer
. There is aleady a Color Picker tool window in MLibTest that comes (by random chance) with a ScrollViewer
:
<demos:PanesTemplateSelector.ColorPickerViewTemplate>
<DataTemplate>
<Border Padding="6">
<ScrollViewer>
<demoviews:ColorSelectionView />
</ScrollViewer>
</Border>
</DataTemplate>
</demos:PanesTemplateSelector.ColorPickerViewTemplate>
But I cannot see any special Auto Hide
problem there. I always have to select the document or another tool window, move the mouse and the Auto Hide tool window dissappears. This is the behavior that I can see whether I use a ScrollViewer in the DataTemplate or not.
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?
from avalondock.
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
from avalondock.
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
Focusable="False"
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 ...
from avalondock.
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...
from avalondock.
Related Issues (20)
- Floating Windows are added twice to _fwList when layout is loaded.
- CaptureMouse in LayoutFloatingWindowControl causes mouse drag to fail when using Expression theme
- Closing document keytip hint HOT 1
- How do I modify the color of AnchorablePaneTabPanel
- When selecting layout anchorable from contextmenu in layout document pane control it doesn´t come into view
- How to change AccentColors Vs2013DarkTheme ? HOT 1
- How do I change this element style? HOT 1
- .NET 8 Update HOT 1
- WPF UI Theming
- Weird 'IsFloating' error at AnchorablePane creation HOT 1
- The widget dragged out, can it be a separate window like in Visual Studio, independent of the parent window? HOT 1
- Layout bug HOT 1
- Community Toolkit Sample HOT 1
- How to keep order of LayoutAnchorable after setting IsVisible HOT 1
- PropertyChanged event is not fired for IsFloating when dragging LayoutAnchorable to float or dock HOT 2
- 动态切换语言
- LayoutDocument可以不显示那个三角符号吗
- Net8 avalondock does not appear in the form editor
- IconSource property does not work when binding defined in Style
- NavigatorWindow crashes application when double clicking on file option
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avalondock.