Announcement

Collapse
No announcement yet.

Building Coder: Scaling a Bitmap for the Large and Small Image Icons

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Building Coder: Scaling a Bitmap for the Large and Small Image Icons

    Every time I created a ribbon button, I was faced with the task of creating appropriately scaled icons for it to populate the PushButton large and small image icon properties LargeImage and Image.They seem to expect a 32 x 32 and 16 x 16 icon, respectively.I finally solved that once and for all by implementing a couple of methods to perform automatic bitmap scaling BitmapImageToBitmap convert a BitmapImage to Bitmap BitmapToBitmapSource convert a Bitmap to a BitmapSource ResizeImage resize an image to the specified width and height ScaledIcon scale down large icon to desired size for Revit ribbon button Usage sample putting them together...

    Click here to view the entire blog post.

Related Topics

Collapse

Working...
X