/// <summary> /// WPF-specific implementation. /// </summary> /// <param name="page">The features page for which a visual is being created.</param> partial void PreparePage(IRomFeaturesConfigurationPage page) { var pageVisual = page.CreateVisual(); pageVisual.UseLayoutRounding = true; pageVisual.UpdateLayout(); pageVisual.Measure(new System.Windows.Size(double.PositiveInfinity, double.PositiveInfinity)); pageVisual.Arrange(new System.Windows.Rect(new System.Windows.Size(2000, 2000))); DesiredWidth = Math.Max(DesiredWidth, pageVisual.DesiredSize.Width); DesiredHeight = Math.Max(DesiredHeight, pageVisual.DesiredSize.Height); }
private void SelectedCategoryChanged(IRomFeaturesConfigurationPage newPage) { if (newPage != null) { NativeVisual pageVisual; if (!_pageVisuals.TryGetValue(newPage, out pageVisual)) { pageVisual = newPage.CreateVisual(); _pageVisuals[newPage] = pageVisual; } CurrentSelectionVisual = pageVisual; var values = _pageVisuals.Values; } }