其實我想知道要將圖像抹去透明度。就像我在頁面背景上有一個圖像和上面的另一個圖像。現在我想要的是,如果我用手指抹去上面的圖像,那麼下面的圖像應該會出現,簡單的說就是說圖像會變得透明。我正在做這樣的事情,但它不符合我的要求。 您的建議是歡迎:)我們可以在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