开发者

Vignette effect without coding

开发者 https://www.devze.com 2023-03-14 02:28 出处:网络
Is there any method exist to create vignetting/frame effect on picturebox, ie another picturebox with png image as overlay/mask? I don\'t want to see sharp edges between pic开发者_如何学编程ture and b

Is there any method exist to create vignetting/frame effect on picturebox, ie another picturebox with png image as overlay/mask? I don't want to see sharp edges between pic开发者_如何学编程ture and background.


You could use OpacityMask : something like

   <Image Width="200" Source="C:\Users\Public\Pictures\Sample Pictures\Chrysanthemum.jpg">
      <Image.OpacityMask>
        <RadialGradientBrush>
          <GradientStop Offset="0.8" Color="#ffff"></GradientStop>
          <GradientStop Offset="1" Color="#0fff"></GradientStop>
        </RadialGradientBrush>
      </Image.OpacityMask>
    </Image>

would give a vignette effect.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号