Closed marcinkurek closed 3 years ago
I tested your changes and got the issue you described as well. When maximizing the window it seems like the window buttons are not aligned to the top but centered instead, althought VerticalAlignment="Top" is set. I think I solved that by wrapping the window buttons' grid in another grid that has two rows. The first has Height="Auto" and contains the buttons' grid. The other one has Height="*" and has no content. It only exists to push the first row to the top. This seems to work better although I don't know why.
I could follow your suggestion and align the buttons to top, but this would only serve as a workaround, and as a result we would end up with shrunk caption buttons on a non-shrunk title bar, which isn't a consistent look. If we cannot fix this properly, a saner workaround would be to disable ShrinkTitleBarWhenMaximized
entirely when PlaceTitleBarOverContent
is true
(since we're not mimicking native behavior to the letter anymore, anyway) but I'd love to get to the bottom of this.
Looks quite good already.
I tested your changes and got the issue you described as well. When maximizing the window it seems like the window buttons are not aligned to the top but centered instead, althought
VerticalAlignment="Top"
is set. I think I solved that by wrapping the window buttons' grid in another grid that has two rows. The first hasHeight="Auto"
and contains the buttons' grid. The other one hasHeight="*"
and has no content. It only exists to push the first row to the top. This seems to work better although I don't know why. Maybe that's an option you want to try out yourself.Regarding the name
RenderTitleBarOverClientArea
I think it is really expressive and describes very well what the feature does. I am a little unsure about the "Render~" part thought. I'd suggest something like "Place~" would be a bit more appropriate. What do you think about "PlaceTitleBarOverContent"? The term "ClientArea" is technically correct but I think "Content" is suitable as well and sounds a bit user-friendlier. If you want to keepRenderTitleBarOverClientArea
I'm fine with that as well though :)Great work here, thanks again!