Tag: lineargradientbrush

在渐变上获取特定位置的颜色

我有GradientStopCollection: GradientStopCollection grsc = new GradientStopCollection(3); grsc.Add(new GradientStop(Colors.Red, 0)); grsc.Add(new GradientStop(Colors.Yellow, .5)); grsc.Add(new GradientStop(Colors.Green, 1)); 我可以在特定位置获得颜色吗? 例如:位置0:红色位置.5:黄色位置.75:?? 有第三方课可以这样做吗?