其实我想知道要将图像抹去透明度。就像我在页面背景上有一个图像和上面的另一个图像。现在我想要的是,如果我用手指抹去上面的图像,那么下面的图像应该会出现,简单的说就是说图像会变得透明。我正在做这样的事情,但它不符合我的要求。 您的建议是欢迎:)我们可以在Windows Phone 8中擦除透明吗?
private void Canvas_MouseMove(object sender, System.Windows.Input.MouseEventArgs e)
{
currentPoint = e.GetPosition(this.canvas);
//Initialize line according to currentpoint position.
Line line = new Line()
{
X1 = currentPoint.X,
Y1 = currentPoint.Y,
X2 = oldPoint.X,
Y2 =oldPoint.Y
};
line.StrokeDashCap = PenLineCap.Round;
line.StrokeEndLineCap = PenLineCap.Round;
line.StrokeLineJoin = PenLineJoin.Round;
line.StrokeThickness = 20;
line.Stroke = new SolidColorBrush(Colors.Black) ;
////////////////////////////////
//Set color & thickness of line.
//Line add in canvas children to draw image & assign oldpoint.
this.canvas.Children.Add(line);
oldPoint = currentPoint;
}
声音有点像重复这个... http://stackoverflow.com/questions/17073357/erase-to-transparency – walther 2014-09-04 10:19:54
@walther不,它不是。这是XAML,而不是GDI。 – 2014-09-04 10:57:01