sorry I made a mistake adding dependent is ok. I was thinking that you are adding dialog as association or aggregation.
Here is an example to use syncStyleClass and then find the closest element that has compact style set to determine to have the dialog as compact mode or not.
Hope this help.
-D