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

Maximising a RibbonWindow with MaxWidth or MaxHeight causes an extra border above the title bar #456

Closed
Cubey2019 opened this issue Aug 15, 2017 · 4 comments
Assignees
Milestone

Comments

@Cubey2019
Copy link
Contributor

If a RibbonWindow has either MaxWidth or MaxHeight set (to a value less than the screen size), when maximising the window there is an extra border along the top edge. Looking closely it appears that there's extra window chrome being shown around the edge of the ribbon window, but it's more obvious at the top edge because there are tiny minimise/maximise/close buttons in the corner separate from the ribbon's buttons.

It's colour is independent from the ribbon background so stands out on a dark theme.

I can reproduce it in the showcase application by adding MaxWidth="1000" to TestWindow.xaml.

Screenshot (the red border I added in paint to highlight where it is :))
border


Environment

  • Fluent.Ribbon v6.0.0 (d58e607)
  • Windows 10
  • .NET Framework 4.6.2 (4.7 installed)
@Cubey2019
Copy link
Contributor Author

Just been testing this and #454 with your latest changes and it's looking much better thanks :)

There does still seem to be a problem though if you maximise a window with SizeToContent set (and haven't manually resized first). I wasn't sure if the problem relates to this issue or #454 (or should be raised as a separate issue entirely).

If I add SizeToContent="WidthAndHeight" to TestWindow.xaml and maximise, the window size docks to the top of the screen but its size is unchanged (not constrained to one monitor and the height doesn't change). The problem with the window chrome returns as well:

sizetocontent-2monitors

When trying to reproduce to capture the above screenshot it did sometimes resize the window correctly (although I can't seem to make it happen again) but the title wasn't being centered and the window buttons were missing (or off-screen):

sizetocontent-width

Finally, if I also add MaxHeight="800" to TestWindow.xaml (with SizeToContent) then the window height will maximise to the correct height but will render black instead of resizing the content:

sizetocontent-maxheight

In all these cases if you restore the window and maximise a second time then everything looks correct.

@batzen
Copy link
Member

batzen commented Aug 22, 2017

Will have a look as soon as i can.

@batzen
Copy link
Member

batzen commented Aug 22, 2017

Let's continue this issue in ControlzEx/ControlzEx#31 as this is caused by the implementation in ControlzEx. The same issues can be reproduced using the showcase application from ControlzEx.

@batzen
Copy link
Member

batzen commented Sep 5, 2017

Latest version of ControlzEx fixes this.

@batzen batzen closed this as completed Sep 5, 2017
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