开发者

Making media element circular in silverlight

I want to make a video MediaElement into a circular shape, but i cannot find 开发者_Go百科a way to do it? Any ideas?


Assuming you want to crop the video (not distort it), it sounds like you can either:

  • Apply an Opacity Mask to the MediaElement
  • Use a VideoBrush (Silverlight only) as the fill for the circular shape


Well you have to create a MASK of Rectangle with Circle as MASK inside Rectangle, which you can put it on the top of your Media Element. So rectangular part will be covered by Rectangle's opaq part and only circular transparent part will be visible.


The right and easy way is...

EllipseGeometry and MediaElement/UIElement Clip Property

http://msdn.microsoft.com/en-us/library/system.windows.uielement.clip.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜