/// <summary>
        /// Raises the System.Windows.Window.ContentRendered event.
        /// </summary>
        /// <param name="e">An System.EventArgs that contains the event data.</param>
        protected override void OnContentRendered(EventArgs e)
        {
            PART_ButtonPanel.Measure(new Size(double.MaxValue, double.MaxValue));
            var panelWidth = PART_ButtonPanel.DesiredSize.Width;

            if (!double.IsNaN(panelWidth))
            {
                if (panelWidth > MaxWidth)
                {
                    MaxWidth = panelWidth + 40;
                }
                if (panelWidth > Options.WindowOptions.DetailedMaxWidth)
                {
                    Options.WindowOptions.DetailedMaxWidth = panelWidth + 40;
                }
                if (panelWidth > MinWidth)
                {
                    MinWidth = panelWidth + 40;
                }
                if (panelWidth > Options.WindowOptions.DetailedMinWidth)
                {
                    Options.WindowOptions.DetailedMinWidth = panelWidth + 40;
                }
            }

            base.OnContentRendered(e);

            PART_ButtonPanel.SetDefaultButton();
        }
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            TryApplyStyle(PART_ImageControl, Options.Styles.ImageControlStyle);
            TryApplyStyle(PART_ScrollViewerControl, Options.Styles.ScrollViewerControlStyle);
            TryApplyStyle(PART_TextControl, Options.Styles.TextControlStyle);
            TryApplyStyle(PART_ButtonPanel, Options.Styles.ButtonsPanelStyle);
            TryApplyStyle(PART_DetailsPresenter, Options.Styles.DetailsPresenterStyle);

            PART_ButtonPanel.TakeStyles(Options.Styles);
        }