-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
What steps will reproduce this issue?
The original dialog (note: the content is 'spread', i.e. the space between the left corner of the dialog's title and the buttons in the right bottom corner):
The problem is that the "stripe", where dialogs are presented in, is separated into three columns (width: 25*, 50*, 25*) and the dialog's contentpresenter resides in the middle column.
So if the custom content isn't spread all over the content area, the alignment of the content seems left orientated (since the first column width of 25* is relative and won't grow)
Content seems 'left orientated' (Note: Space on the left side of the content is less than the space on the right side of the content)
To fix this the HorizontalAlignment of the 'core" grid (the one that hosts contentpresenter and PART_Title) should be HorizontalAlignment="Center".
So can you (=> bind to parent HorizontalContentAlignment).
Expected outcome
It should be possible to set alignment of a BaseMetroDialog's content.
Frankly, just bind the HorizontalAlignment of the 'core grid' to the BaseMetroDialog's HorizontalContentAlignment in the controltemplate.
Expected Dialog (note: the whole content is center aligned):
Repo
None :-(
Environment
-
MahApps.Metro v1.5.23
-
Windows OS 10.0.14393 (x64)
-
Visual Studio 2015
-
.NET Framework 4.7.1