I am having some trouble with maximizing a RadRibbonWindow with the taskbar is at the top or on the left of the screen. I have set the maximum height and the maximum width of the window, which raises some other issues such as when the task bar is moved (which would rarely happen so I can overlook that at the moment).
In the attached Maximized.png image, you can see that it is only scaling to the size of the screen area without the taskbar, but the top is right at 0,0 on the screen which puts it under my taskbar.
How can I make it so that it will not be under the task bar?
6 Answers, 1 is accepted
Thank you for the screenshots.
This is an expected behavior even with a standard WPF Window. It is related to a limitation in the native Window control when the MaxWidth property is set. I have searched for a possible workaround and I think I manage to found one which works for the primary monitor. You can check this StackOverflow thread for further information. You can additionally modify the approach to fit in your application. Another possible solution is to remove the MaxWidth property of the RadRibbonWindow.
For your convenience I have created a sample project that demonstrates the approach from StackOverflow. You can find it attached to this reply.
I have found that the example Office2016InspiredRibbonView_WPF Project in the RibbonView_WPF Solution doesn't seem to hide behind the task bar.
What properties or settings are making that project work differently than how native wpf works? I have had a look and I can't find anything different.
Thank you for the screenshots.
I ran the example you pointed and when I set MaxWidth property of the RadRibbonWindow the behavior is reproduced. It's not theme related but a limitation in the native Window control which RadRibbonWindow inherits.
As a workaround, you can use one of the approaches suggested in my first reply.
Another possible solution is to remove the MaxWidth property of the RadRibbonWindow.
I tried this. The window is still under the taskbar but it now goes all the way to the right hand side as well.
This is a strange behavior. I have double checked the Office2016InspiredRibbonView_WPF project on my side but I wasn't able to make the Window go under the taskbar when I removed the MaxWidth property (you can see the attached screenshots). By removing the MaxWidth property the window will take all the available space (working area). Have you done any modifications to the project on your side? If yes, can you share it?
Looking at the attached images in your first reply, it seems that the display scale property is set to 125%. I did the same but still was unable to reproduce the described behavior.
Attached, you can find the Office2016InspiredRibbonView_WPF project using the latest DLLs. Could you check which DLLs are you using on your side? Can you double check the behavior by setting and removing the MaxWidth property (when you set it, the Window should go under the taskbar and by removing it - it should scale normally)?
Looking forward to your reply.