-
Notifications
You must be signed in to change notification settings - Fork 884
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
AvalonDock: recommended way to disable hiding behavior for LayoutAnchorable and friends #1500
Comments
Hi, Can you be more precise (maybe by giving a sample code showing the issue) ? Thanks. |
Sure thing, I'll upload an example of what I'm talking about when I get a chance this week 👍 |
Hi Simon, |
Hi Boris, would you be able to suggest a change in default or serialization behavior to fix this over in my branch? It seems like someone else has run into the same issue as Simone... ...and we could also Collapse the button instead of Hiding (I was not aware of a layout issue there). |
Finally got the time to throw together a basic example. My first attempt to use AvalonDock was to have dockable panes that could be tabbed in the main area, anchor to any of the four sides, or float and provide another complete new window for others to dock on. I set Here is the relevant XAML from the attached example project showing the issue:
If I don't set Hope this is clarifies things! |
For our project the solution was to remove _canClose = false in LayoutAnchorable constructor thus reverting to original pre v3.3 behavior.
That would probably require adjustments in document tab area template but it seems to me that the button should be Hidden and not Collapsed. |
Hi bdachev, For the document tab area, I can't reproduce an ugly (collaped vs hidden) button. Can you in the latest version ? For the serialization, you got a point. The serialization will always be made for LayoutContent.CanClose in v3.9. Thank you for bringing this to our attention. |
Hi SirUppyPancakes , Thank you for bringing this to our attention. |
Somewhat related to #1117
LayoutAnchorable
setsCanClose
tofalse
by default, and I noticed that the code also does unexpected things like coercingCanClose
to false when you tear aLayoutAnchorable
off of aLayoutDocumentPane
.My goal is to not have "hiding" behavior at all, as it just creates memory leaks for my use-cases. When a user closes a
LayoutAnchorable
, I always want it to close permanently.So far, the only approach I have been able to come up with is to set
CanClose
andCanHide
to true and add these handlers toClosed
andHiding
on every singleLayoutAnchorable
:This feels super hack-y, but my other attempts to get the behavior I need have failed. Is this the best I can do to get this behavior for now?
The text was updated successfully, but these errors were encountered: