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

The SetWindowSizeWhenOpened Feature is broken #174

Closed
Dirkster99 opened this issue Jul 3, 2020 · 8 comments
Closed

The SetWindowSizeWhenOpened Feature is broken #174

Dirkster99 opened this issue Jul 3, 2020 · 8 comments

Comments

@Dirkster99
Copy link
Owner

Feature Description

SetWindowSizeWhenOpened
If true the MinHeight and MinWidth of the content will be used together with the margins to determine the initial size of the floating window.

Last Build where this worked as Expected

https://github.com/Dirkster99/AvalonDock/tree/1efc3697369e92954f5909c41fd7ba603ace3ce3

Set SetWindowSizeWhenOpened = True in App.xaml of TestApp
Untitled1

Start TestApp and Select Tools>New floating window
Untitled2

Wrong Behavior with Current Build

Set SetWindowSizeWhenOpened = True in App.xaml of TestApp
Start TestApp and Select Tools>New floating window

Result: Window is not automatically resized but has the size of one button
Untitled

@LyonJack
Copy link
Contributor

LyonJack commented Jul 4, 2020

This is not a problem caused by my code submission. Because the project has set the SetWindowSizeWhenOpened property of LayoutAnchorableFloatingWindowControl in the App.xaml, but in the code example, the theme of DockManager has been switched, and the style of DarkVS2013Theme has been used. In fact App.Xaml the setting does not work. Consider changing the design, giving the property to the DockManager, which can be set directly on the control, so as to facilitate users to use the modification, and fix the problems caused by modifying the theme

LyonJack added a commit to LyonJack/AvalonDock that referenced this issue Jul 4, 2020
@LyonJack
Copy link
Contributor

LyonJack commented Jul 4, 2020

Confirm the feasibility of the design change, which needs the help of the original author

@Dirkster99
Copy link
Owner Author

Dirkster99 commented Jul 5, 2020

Hi @eriove

@LyonJack suggests that we should rather implement the SetWindowSizeWhenOpened property as a AutoWindowSizeWhenOpened dependency property in the DockingMananger (see comments above). This change works for me - What do you think about is (oringinally implemented in PR #146)?

@LyonJack
Copy link
Contributor

LyonJack commented Jul 5, 2020

Hi @eriove
I have a pull request that completed that suggestion
0569383

@eriove
Copy link
Contributor

eriove commented Jul 5, 2020

I like this change, seems much more logical. I don't have access to a computer right now so I can't properly review #175 (I don't know the code base we'll enough to do it from a phone). Will try to do that on Monday or Tuesday.

@LyonJack
Copy link
Contributor

LyonJack commented Jul 5, 2020

Now there is a new problem when users are in the App.xaml A default floating form style was set in. When the theme was reset in the dockmanager, the App.xaml The settings in do not take effect. My suggestion is to set the global dependency properties in the dockemanager instance. However, this will bring another problem, that is, users cannot freely change the value of any floating window adapt sub content layout

@eriove
Copy link
Contributor

eriove commented Jul 7, 2020

Now there is a new problem when users are in the App.xaml A default floating form style was set in. When the theme was reset in the dockmanager, the App.xaml The settings in do not take effect. My suggestion is to set the global dependency properties in the dockemanager instance. However, this will bring another problem, that is, users cannot freely change the value of any floating window adapt sub content layout

Is this a new problem created by #175 or is it another bug in general?

Dirkster99 added a commit that referenced this issue Jul 7, 2020
#174 Migrating AutoWindowSizeWhenOpened to DockingManager
#177 Toolbar Item Color Error
Dirkster99 added a commit that referenced this issue Jul 7, 2020
@Dirkster99
Copy link
Owner Author

@LyonJack & @eriove You guys are awesome 👍

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

No branches or pull requests

3 participants