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

How to make window resizable with Win32 content? #319

Closed
floele-ww opened this issue May 18, 2016 · 16 comments
Closed

How to make window resizable with Win32 content? #319

floele-ww opened this issue May 18, 2016 · 16 comments
Assignees
Milestone

Comments

@floele-ww
Copy link
Contributor

Hi,

if you have Win32/WinForms content located at either the right or left side of the window, it is quite difficult to change the window width.

Check the following screenshot:
resizablearea

The red area is not resizable by default, the orange areas are not resizable because the Win32 content is displayed on top of the area that would be resizable (the content is arranged using a docking control, so there is at least some space in between the Win32 windows). This leaves very little of the window for resizing purposes.

Any suggestions for improving the situation? Office 2013 for example apparently has an invisible resize border outside the window bounds so it never conflicts with content within the window.

@batzen
Copy link
Member

batzen commented May 21, 2016

I had a fix for this which worked fine on windows 10, but caused many issues on windows 7 and 8. I currently don't have a solution for this issue.
I have been very busy during the last few weeks and will be for a few more, but improving resizing is already on my list. But getting it to work correctly on every supported version of windows is hard...

@floele-ww
Copy link
Contributor Author

OK, thanks, looking forward to the improvement.

@batzen
Copy link
Member

batzen commented May 24, 2016

It would be nice if you could create a repro showing your issues with Win32.
The more repros i have, the more reliable i can try to fix the issue.

@batzen batzen added this to the 5.0.0 milestone May 26, 2016
@batzen batzen self-assigned this May 26, 2016
@batzen
Copy link
Member

batzen commented Jun 9, 2016

Any chance to get a repro from you?

@floele-ww
Copy link
Contributor Author

I wonder what exactly you expect. Just having a Dock=Full Win32 textbox inside the window would be a quite simple repo barely worth to create a demo project for?

@batzen
Copy link
Member

batzen commented Jun 13, 2016

That part of information should be enough. Just didn't know exactly in which situations you encounter issues.

@floele-ww
Copy link
Contributor Author

OK. Basically it's just the WPF airspace issue, no special conditions required as far as I can see.

@batzen
Copy link
Member

batzen commented Sep 17, 2016

I don't know how to fix an issue that even microsoft was unable to fix since they first released WPF.
If you got any advice on how to fix this i would be very happy.

@batzen batzen removed this from the 5.0.0 milestone Sep 17, 2016
@floele-ww
Copy link
Contributor Author

You don't be able to fix the airspace issue, sure. I was thinking about some kind of workaround, like an additional invisible border outside of the window bounds maybe. At the very least it should be possible to fix resizing within the ribbon area though.

@batzen
Copy link
Member

batzen commented Sep 19, 2016

I tried to add an invisible resize border using win32 stuff in ControlzEx.
Worked well on windows 8 and 10, was a disaster on windows 7.

Don't know how to fix resizing in the ribbon area either. The only way that i can imagine of is a margin and that would not work out very well...

It's so sad that microsoft does not provide a proper win32 api do achieve this.

@floele-ww
Copy link
Contributor Author

Worked well on windows 8 and 10, was a disaster on windows 7.

So why not keep it as feature for Win8 and later only? It's perferctly fine to argue that a certain "feature" will only be available in more recent versions of Windows.

@batzen
Copy link
Member

batzen commented Sep 20, 2016

Because it becomes more difficult to maintain, that win32 stuff is horribly fragile, and i can't detect win 10 in a reliable way as Microsoft changed the version api.
It was a long way to get the window to work like it does now. I don't want to add more complexity to that stuff.

@floele-ww
Copy link
Contributor Author

Hm...looking at MS Office 2013, it seems like they use multiple separate windows around the main window for rendering the shadows and providing resize functionality:

shadows

See also: https://support.microsoft.com/en-us/kb/2821007

Maybe that is a possibility?

@batzen
Copy link
Member

batzen commented May 10, 2018

@floele-sp Took a while but i finally decided to add the GlowWindow from MahApps.Metro to ControlzEx and use it in Fluent.Ribbon. Will be available here as soon as ControlzEx/ControlzEx#49 is done.

@batzen batzen added this to the 7.0.0 milestone May 10, 2018
@floele-ww
Copy link
Contributor Author

Thanks, looking forward to it 👍

@batzen
Copy link
Member

batzen commented Jul 7, 2018

GlowWindow branch + PR merged. This should be fixed now.

@batzen batzen closed this as completed Jul 7, 2018
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