21 Mart 2018 Çarşamba

WPF ProgressBar Sınıfı

Çift renkli yapmak için şöyle yaparız.
<ProgressBar Width="500" Value="70" Height="30">
  <ProgressBar.Foreground>
    <LinearGradientBrush StartPoint="0,0" EndPoint="1,0" >

      <GradientStop Color="Green" Offset="0" />
      <GradientStop Color="Green" Offset="0.3" />
      <GradientStop Color="Red" Offset="0.3" />
      <GradientStop Color="Red" Offset="0.5" />
      <GradientStop Color="Green" Offset="0.5" />
      <GradientStop Color="Green" Offset="1" />

    </LinearGradientBrush>
  </ProgressBar.Foreground>
</ProgressBar>

Hiç yorum yok:

Yorum Gönder