将LinearGradientBrush应用于Path

时间:2016-10-12 14:45:02

标签: wpf xaml

PathLinearGradientBrush

<Path Data="M76,261 C273,301 166.53234,85.564862 274.5,301.5"
      HorizontalAlignment="Left"
      Height="148.664"
      Margin="76,203.836,0,0"
      Stretch="Fill"
      VerticalAlignment="Top"
      Width="323.5"
      StrokeThickness="10">
  <Path.Stroke>
    <LinearGradientBrush EndPoint="0.05,0.0"
                         StartPoint="0.0,0.0"
                         SpreadMethod="reflect">                    
      <GradientStop Color="Blue" Offset="0.0"/>
      <GradientStop Color="White" Offset="1"/>                    
    </LinearGradientBrush>
  </Path.Stroke>            
</Path>

enter image description here

如何将GradientBrush应用于Path,以便过渡线(渐变停止)在Path的每个点垂直于Path的切线?

这样的事情(我不是Photoshop中的专业人士):enter image description here

0 个答案:

没有答案