RibbonGroupBox does not appear when visibility set

Jul 23, 2010 at 9:44 AM
Edited Jul 23, 2010 at 9:45 AM
Hi all I have a RibbonGRoupBox Collapsed that I set to visible though a binding at runtime. The Ribbon Group Box does not appear. I add to modify the RibbonGRoupBox code like the following to make that work:
/// <summary> /// Static constructor /// </summary> [SuppressMessage("Microsoft.Performance", "CA1810")] static RibbonGroupBox() { DefaultStyleKeyProperty.OverrideMetadata(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(typeof(RibbonGroupBox))); VisibilityProperty.AddOwner(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(OnVisibilityChanged)); // added StyleProperty.OverrideMetadata(typeof(RibbonGroupBox), new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceStyle))); // end added } // added static object OnCoerceStyle(DependencyObject d, object basevalue) { if (basevalue == null) { basevalue = ((FrameworkElement)d).Resources["RibbonGroupBoxStyle"] as Style ?? Application.Current.Resources["RibbonGroupBoxStyle"] as Style; } return basevalue; } // end added How can this be include in the code base on codeplex?
Coordinator
Jul 23, 2010 at 10:03 AM

This will be fixed in v2