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

Size of floated DockPane when dragged out #517

Open
michaelcsikos opened this issue Oct 6, 2017 · 1 comment
Open

Size of floated DockPane when dragged out #517

michaelcsikos opened this issue Oct 6, 2017 · 1 comment

Comments

@michaelcsikos
Copy link

In Visual Studio, when a docked pane is dragged out, the current size of the pane is maintained. I believe this should be the default behaviour.

I think this only requires two methods to change:

DockPane.cs

Rectangle IDockDragSource.BeginDrag(Point ptMouse)
{
    Point    location  = PointToScreen(new Point(0, 0));
    DockPane floatPane = ActiveContent.DockHandler.FloatPane;
    Size     size;

    if (DockState == DockState.Float)
        size = DockPanel.DefaultFloatWindowSize;
    else
        size = ClientRectangle.Size;
...

DockContentHandler.cs

Rectangle IDockDragSource.BeginDrag(Point ptMouse)
{
    DockPane floatPane = FloatPane;
    Size     size;

    if (DockState == DockState.Float)
        size = DockPanel.DefaultFloatWindowSize;
    else
        size = Pane.ClientRectangle.Size;
...

Kind regards
Michael

@lextm
Copy link
Member

lextm commented Oct 6, 2017

You can send a pull request. Thanks.

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

No branches or pull requests

2 participants