Positioning Children in the center of mdi

Jul 29, 2015 at 8:10 PM
I achieve this by changing Children_CollectionChanged in the MdiContainter class by adding
                            var m = new Thickness();
                            m.Top = (ActualHeight-mdiChild.ActualHeight) / 2;
                            m.Left = (ActualWidth-mdiChild.ActualWidth) / 2;
                            m.Right = 0;
                            m.Bottom = 0;
                            mdiChild.Margin = m;
after the Focus(mdiChild) statement.

Is there a more proper way to do this?