如何在Workflow Foundation中的“自定义活动设计器”上设置自定义图标?

时间:2019-06-11 17:09:34

标签: workflow-foundation activitydesigner workflow-rehosting

我正在重新托管.NET Framework的工作流基础。我有一个自定义 Activity。我试图指出我的文件夹体系结构图标属性的要点。

我想要在自定义活动中显示一个自定义图标。 但是当我运行该应用程序时,出现此错误:

System.Windows.Markup.XamlParseException: ''Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '9' and line position '5'.'

我相信我以某种方式错误地设置了URL,但是我尝试了很多可以在互联网上找到的变体,但仍然无法正常工作。

enter image description here

我希望这里的图像能说明我的问题。

1 个答案:

答案 0 :(得分:0)

在下面添加内容就可以了:

<sap:ActivityDesigner.Icon>
        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="16,16" ></Rect>
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="pack://application:,,,/Wpf.MainApp;component/Assets/Icons/icons8-data-grid-96.png"></BitmapImage>
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>
相关问题