1

我正在重新托管 .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,但我尝试了很多我可以在互联网上找到的变体,但仍然无法让它工作。

在此处输入图像描述

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

4

1 回答 1

1

在下面添加这个就可以了:

<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>
于 2019-06-12T09:17:55.587 回答