RevitExtensions icon indicating copy to clipboard operation
RevitExtensions copied to clipboard

Add in-memory image support and contextual help to RibbonExtensions

Open magsonleone opened this issue 4 months ago • 4 comments

Summary of the Pull Request

What is this about: Add in-memory image support and contextual help to RibbonExtensions

Description:

This PR introduces new features and improvements to the Ribbon extensions for Revit:

  • New in-memory image support
    • Added SetImage(Bitmap) and SetLargeImage(Bitmap) methods to apply 16x16 and 32x32 icons directly from System.Drawing.Bitmap.
    • Automatic conversion to WPF BitmapSource, enabling runtime or embedded resource icons.
  • Simplified contextual help
    • Added SetContextualHelp(string url) method to quickly associate documentation or support pages with Ribbon buttons.
  • Technical updates
    • Added System.Drawing.Common dependency to the project.
    • Introduced ConvertToImageSource() helper for safe and efficient GDI+ to WPF conversion.

These additions make Revit UI customization more flexible and dynamic, supporting both runtime-generated icons and integrated online help.

Quality Checklist

  • [ x ] My code follows the style guidelines of this project
  • [ x ] I have performed a self-review of my own code
  • [ x ] My changes generate no new warnings

magsonleone avatar Sep 12 '25 16:09 magsonleone