RevitExtensions
RevitExtensions copied to clipboard
Add in-memory image support and contextual help to RibbonExtensions
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)andSetLargeImage(Bitmap)methods to apply 16x16 and 32x32 icons directly fromSystem.Drawing.Bitmap. - Automatic conversion to WPF
BitmapSource, enabling runtime or embedded resource icons.
- Added
-
Simplified contextual help
- Added
SetContextualHelp(string url)method to quickly associate documentation or support pages with Ribbon buttons.
- Added
-
Technical updates
- Added
System.Drawing.Commondependency to the project. - Introduced
ConvertToImageSource()helper for safe and efficient GDI+ to WPF conversion.
- Added
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