Fluent.InRibbonGallery.OnMaxItemsInRowChanged C# (CSharp) Method

OnMaxItemsInRowChanged() private static method

private static OnMaxItemsInRowChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void
d System.Windows.DependencyObject
e System.Windows.DependencyPropertyChangedEventArgs
return void
        private static void OnMaxItemsInRowChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            InRibbonGallery gal = d as InRibbonGallery;
            int minItemsInRow = (int)e.NewValue;
            if (!gal.IsDropDownOpen && (gal.galleryPanel != null) && (gal.galleryPanel.MinItemsInRow < minItemsInRow))
            {
                gal.galleryPanel.MinItemsInRow = minItemsInRow;
                gal.galleryPanel.MaxItemsInRow = minItemsInRow;
            }
        }