This project is read-only.

[2.0] Inconsistent close button behavior

Sep 28, 2012 at 5:51 PM

I haven't created a bug for this, as I'm not sure if this is by design or not ...

When a LayoutAnchorable is inside a LayoutAnchorablePane whether it is docked or floating, clicking the close button, will call the hide command. However if a LayoutAnchorable is in the DocumentPane the close button calls the close command.

I would expect the close button behavior to be consistent no matter where the LayoutAnchorable is positioned.

Also, as a follow on from this, is there a way to specify if a LayoutAnchorable should be hidden or closed? Or is it a case of using templates and styles to change the command binding to point to the right command based on the content I'm displaying?

Sep 28, 2012 at 9:15 PM

I think that it is a normal behaviour.

If you follow Visual Studio logic, a Pane is a host for for tool that should always be available to the users (but it can be hidden/dock in the UI and reinvoked latter on when needed)

As for the document, it is an working instance (like a document) that can be closed. Once closed than it is no longer used.

Sep 28, 2012 at 10:28 PM

Yeah, I understand that, but you can place a tool window into the DocumentPane, this is the scenario I'm concerned with. At this point the close button calls the Close method on the tool window, rather the Hide method that is called when the Tool Window is docked elsewhere.

Oct 2, 2012 at 9:21 PM

hmm, i see your concern.

Maybe the call to the corresponding commanding is type dependent? Not to either look at the code or wait for a confirmation from ado.