亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

在WF4.0中修改自定義Activity的Icon

標簽:
Html/CSS

    "Icon" is a property on the main <sap:ActivityDesigner> element of the designer and it's of type "DrawingBrush". 

    If you want to set an image (BMP, JPG...) as the Icon, just add this XAML exactly after the starting element of the designer: 代码

<sap:ActivityDesigner.Icon> 

        <DrawingBrush>
            <DrawingBrush.Drawing>
                <ImageDrawing>
                    <ImageDrawing.Rect>
                        <Rect Location="0,0" Size="16,16" ></Rect>
                    </ImageDrawing.Rect>
                    <ImageDrawing.ImageSource>
                        <BitmapImage UriSource="D:\Public\Foto\IMG_2560.JPG" ></BitmapImage>
                    </ImageDrawing.ImageSource>
                </ImageDrawing>
            </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>

     Obviously, change the UriSource to match your Icon/Bitmap. If you want to apply a WPF DrawingBrush, design the Icon with Expression Designer and copy/paste XAML/ResourceDicrionary and use it.
    If you want to set a vectorial drawing, like I do:

代码

<sap:ActivityDesigner.Icon>
        <DrawingBrush>
                <DrawingBrush.Drawing>
                    <DrawingGroup>
                        <DrawingGroup.Children>
                            <GeometryDrawing Geometry="F1 M 35,-124C 45.2172,-124 53.5,-115.717 53.5,-105.5C 53.5,-95.2827 45.2173,-86.9999 35,-86.9999C 24.7827,-86.9999 16.5,-95.2827 16.5,-105.5C 16.5,-115.717 24.7828,-124 35,-124 Z ">
                                <GeometryDrawing.Pen>
                                    <Pen Thickness="0.32" LineJoin="Round" Brush="#57008898"/>
                                </GeometryDrawing.Pen>
                                <GeometryDrawing.Brush>
                                    <RadialGradientBrush RadiusX="0.5" RadiusY="0.5" Center="0.71625,0.283751" GradientOrigin="0.71625,0.283751">
                                        <RadialGradientBrush.GradientStops>
                                            <GradientStop Color="#57FFFFFF" Offset="0.0104712"/>
                                            <GradientStop Color="#5712C5DB" Offset="0.65445"/>
                                            <GradientStop Color="#5714C5DB" Offset="0.654727"/>
                                            <GradientStop Color="#5717C6DB" Offset="0.905759"/>
                                            <GradientStop Color="#5711A5B7" Offset="1"/>
                                        </RadialGradientBrush.GradientStops>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup/>
                                        </RadialGradientBrush.RelativeTransform>
                                    </RadialGradientBrush>
                                </GeometryDrawing.Brush>
                            </GeometryDrawing>
                        </DrawingGroup.Children>
                    </DrawingGroup>
                </DrawingBrush.Drawing>
        </DrawingBrush>
    </sap:ActivityDesigner.Icon>

 



點擊查看更多內容
TA 點贊

若覺得本文不錯,就分享一下吧!

評論

作者其他優質文章

正在加載中
  • 推薦
  • 評論
  • 收藏
  • 共同學習,寫下你的評論
感謝您的支持,我會繼續努力的~
掃碼打賞,你說多少就多少
贊賞金額會直接到老師賬戶
支付方式
打開微信掃一掃,即可進行掃碼打賞哦
今天注冊有機會得

100積分直接送

付費專欄免費學

大額優惠券免費領

立即參與 放棄機會
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號

舉報

0/150
提交
取消