Пример #1
0
        void ComputeHeight()
        {
            if (ctrlMan == null)
            {
                return;
            }

            if (double.IsNaN(appSettings.Window.Height) || appSettings.Window.Height <= 0)
            {
                double titleBarHeight = 30;
                var    margin         = window.Margin.Top + window.Margin.Bottom;
                var    padding        = window.Padding.Top + window.Padding.Bottom;

                var h = ctrlMan.ComputeHeight() + margin + padding + titleBarHeight;
                window.MinHeight = h;
                window.Height    = h;
            }
        }