Silverlight 中怎么Ellipse 中填充图片(C#代码)?
展开全部
Ellipse ell = new Ellipse(); //椭圆
ell.Width = 150;
ell.Height = 100;
var brush = new ImageBrush(); //定义图片画刷
var converter = new ImageSourceConverter();
brush.ImageSource = (ImageSource)converter.ConvertFromString("your image uri");
ell.Fill = brush;//填充
ell.Width = 150;
ell.Height = 100;
var brush = new ImageBrush(); //定义图片画刷
var converter = new ImageSourceConverter();
brush.ImageSource = (ImageSource)converter.ConvertFromString("your image uri");
ell.Fill = brush;//填充
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询