@@ -504,14 +504,27 @@ public static RibbonSplitButton NewPulldownButton(this RibbonPanel ribbonPanel,
504
504
return pulldownButton ;
505
505
}
506
506
507
+ /// <summary>
508
+ /// Sets the image size for the list items in a <see cref="RibbonSplitButton"/>.
509
+ /// </summary>
510
+ /// <typeparam name="T">The type of the ribbon split button.</typeparam>
511
+ /// <param name="ribbonSplitButton">The ribbon split button to extend.</param>
512
+ /// <param name="listImageSize">The image size to set for the list items. Default is <see cref="RibbonImageSize.Standard"/>.</param>
513
+ /// <returns>The ribbon split button with the updated list image size.</returns>
514
+ public static T SetListImageSize < T > ( this T ribbonSplitButton , RibbonImageSize listImageSize = RibbonImageSize . Standard ) where T : RibbonSplitButton
515
+ {
516
+ ribbonSplitButton . ListImageSize = listImageSize ;
517
+ return ribbonSplitButton ;
518
+ }
519
+
507
520
/// <summary>
508
521
/// Adds the specified ribbon items to the <see cref="RibbonListButton"/>.
509
522
/// </summary>
510
523
/// <typeparam name="T">The type of ribbon list button.</typeparam>
511
524
/// <param name="ribbonListButton">The ribbon list button to extend.</param>
512
525
/// <param name="ribbonItems">The ribbon items to add.</param>
513
526
/// <returns>The ribbon list button with the items added.</returns>
514
- public static T AddItems < T > ( this T ribbonListButton , params RibbonItem [ ] ribbonItems ) where T : RibbonListButton , new ( )
527
+ public static T AddItems < T > ( this T ribbonListButton , params RibbonItem [ ] ribbonItems ) where T : RibbonListButton
515
528
{
516
529
return ribbonListButton . AddItems ( null , ribbonItems ) ;
517
530
}
@@ -526,7 +539,7 @@ public static RibbonSplitButton NewPulldownButton(this RibbonPanel ribbonPanel,
526
539
/// <returns>
527
540
/// The ribbon list button with the items added.
528
541
/// </returns>
529
- public static T AddItems < T > ( this T ribbonListButton , RibbonPanel ribbonPanel , params RibbonItem [ ] ribbonItems ) where T : RibbonListButton , new ( )
542
+ public static T AddItems < T > ( this T ribbonListButton , RibbonPanel ribbonPanel , params RibbonItem [ ] ribbonItems ) where T : RibbonListButton
530
543
{
531
544
foreach ( var ribbonItem in ribbonItems )
532
545
{
0 commit comments