Skip to content
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

Pull for dock with #78

Closed
wants to merge 3 commits into from

Conversation

jogibear9988
Copy link
Contributor

No description provided.

@jogibear9988
Copy link
Contributor Author

@Dirkster99 is this okay so?

@Dirkster99
Copy link
Owner

I have done a short test setting the DockWith and DockHeight:

<avalonDockLayout:LayoutRoot>
    <avalonDockLayout:LayoutPanel Orientation="Vertical">
        <avalonDockLayout:LayoutDocumentPane/>
        <avalonDockLayout:LayoutAnchorablePane Name="ToolsPane" DockHeight="150" DockWidth="50">
        </avalonDockLayout:LayoutAnchorablePane>
    </avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>

in MLibTest's MainWindow - this let me to the screenshot below where I dragged a tool window off the mainwindow and found that the content of the floatingwindow has the right size while the floatingwindow is larger:

Untitled

I am not 100% sure about our expectations with this pull request so I am trying to spell it out here to make sure testing and later documentation is correct:

  1. The user sets a the DockWitdh or DockHeight property - the system docks a LayoutAnchorable with the given DockWitdh/DockHeight if there is no other LayoutAnchorable in the target of the drop operation (eg. SidePanelPosition).

  2. Documents or LayoutAnchorables in the DocumentPane are not controlled by the DockWidth/DockHeight property setting

  3. The default height and width of a floating acnhorable window is the DockWidth/DockHeight set (if available).

  4. Question: How does DockWidth/DockHeight play with DockMinWidth/DockMinHeight?
    See Made calculating of DockMinSize for panel based on children DockMinSize #54 and The minimum sizes of the floating window are made on the basis of ... #58

The points 1-3 are just proposals (no hard rules so please correct me if I am wrong). The lost point should be resolved in spec so we can test against it. Would you see other test scenarios then the one I've been using here?

@jogibear9988
Copy link
Contributor Author

@Dirkster99 does it work now?

@Dirkster99
Copy link
Owner

This looks better with regard to the floating window bug - the floating window (or its content) is no longer influenced by the DockWidth - I hope this was your intention(?) - I adjusted 3) to reflect this.
Which means you want to resolve point 3. in the list as shown below, right? 👍

Point 4) is also a logical behavior and it seems to be implemented like that at the moment 👍

But for point 1) I am finding a strange behavior which is that tool windows are docked with different sizes if I set the following values:

  • <avalonDockLayout:LayoutAnchorablePane Name="ToolsPane" DockHeight="100" DockWidth="100" DockMinHeight="50" DockMinWidth="50">

  • Ensure there is no AvalonDock.Layout.config file in the bin folder of MLibTest

  • Start MLibTest and drag the tool windows from the bottom to the right side panel position
    The system applies the DockWidth size [OK]

  • Restart the same test (ensure AvalonDock.Layout.config file is removed) and drag tool windows from the bottom to the left side panel position
    The system applies the DockWidth size [OK]

    Drag the tool windows from the left side panel position to the right side panel position
    The system makes the tool windows half as big as the mainwindow - the DockWidth size is not applied [NOK]

    I find the same [NOK] behavior if I Restart the same test (ensure AvalonDock.Layout.config file is removed) and drag a single tool window by its label at the left bottom corner (eg File Stats) and drag it into the left or right side panel position - then the DockWidth is not applied (the resulting toolwindow has half the width of the MainWindow).

I hope you can follow these workflows to understand where this is behaving inconsistently - otherwise, let me know if you have issues understanding the issues since I can always attach screenshots as well...

  1. The user sets a the DockWitdh or DockHeight property - the system docks a LayoutAnchorable with the given DockWitdh/DockHeight if there is no other LayoutAnchorable in the target of the drop operation (eg. SidePanelPosition).

  2. Documents or LayoutAnchorables in the DocumentPane are not controlled by the DockWidth/DockHeight property setting

  3. The default height and width of a floating anchorable window is not influenced by the DockWidth/DockHeight set (if available).

  4. DockWidth/DockHeight is ignored if its smaller than DockMinWith/DockMinHeight.

@jogibear9988
Copy link
Contributor Author

@Dirkster99
Copy link
Owner

OK I have seen the StackOverflow entry below but it does not say when the DockWidth/DockHeight should be applied or not - so, it does not really present any new helpful information (unless I am missing a listing of testable requirements somewhere...).

The thing is that I spent about 10 minutes testing (can't do more right now because of other time constrains) and found 3 different workflows to drag a tool window into an empty docking position and the fix appears to work in only 1 of 3 cases. So, it fixes at best one third of the problem but certainly not the problem itself...

@jogibear9988
Copy link
Contributor Author

What I‘d like to fix was setting the DockWith in Pixels when the Container is already docked wich does not work without this patch in my layout...
1/3 is better than nothing

@Dirkster99
Copy link
Owner

Dirkster99 commented Oct 4, 2019

Can you please give me a more detailled sample or workflow description so I better understand what you want to fix?

One thing I don't understand (for example) is the introduction of the ForceFixedDockSize property at the level of the LayoutPositionableGroup - this makes the property available for:

  • LayoutDocumentPane
  • LayoutDocumentPaneGroup
  • LayoutPane
  • LayoutAnchoreablePane

So, this ForceFixedDockSize property and the support for DockWidth is intended for Documents and LayoutAnchoreables? But I cannot seem to determine what the ForceFixedDockSize property really does because I can set it to true or false but cannot see a difference in the implementation…?

I can see that we have a DockWith="100" property set in the TestApp and it controls the initial size of the LayoutAnchorable - thats the use case you want to support, right?

But I am not sure about the ForceFixedDockSize property nor do I know whether we need this support for documents as well. It can look really ugly if you set DockWith="50" for the:

  • LayoutAnchorablePane (with WinFormsWindow)
  • LayoutDocumentPaneGroup
  • LayoutAnchorablePaneGroup (with toolWindow1)

Untitled

@Dirkster99
Copy link
Owner

The DockWidth property is already present in the TestApp project in the current master branch. I set it to 50 and the initial size of the LayoutAnchorable is 50 - so I cannot verify why this does no seem to work the way you want this to work :-(

@Dirkster99
Copy link
Owner

Sorry for being such a pain about this but I need a testable description similar to this, that, or this.

Otherwise this is not acceptable (sorry but I've been accepting half-harded badly communicated changes before and only got more problems rather than helpful support from it..)

@Dirkster99 Dirkster99 closed this Oct 26, 2019
@jogibear9988
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants