Поделиться через


Icons for the Designer

We have already seen how to have icons for the toolbox items. However, unfortunately, it is not the same way for the icons on the designer surface.

Good news though, it is not that difficult. As we create our ActivityDesigner, we essentially need to add the following property:

 <sap:ActivityDesigner.Icon>
        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="25,25" ></Rect>
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="Activity-Monitor-icon.png" ></BitmapImage>
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
</sap:ActivityDesigner.Icon>

Hope this helps!

Thanks,

Kushal.

Comments

  • Anonymous
    May 12, 2011
    Can you do this with a CodeActivity to make it use say a built-in activity's icon on the designer?