GradientBrush.ColorInterpolationMode GradientBrush.ColorInterpolationMode GradientBrush.ColorInterpolationMode GradientBrush.ColorInterpolationMode Property

정의

그라데이션의 색을 보간하는 방법을 지정하는 ColorInterpolationMode 열거형을 가져오거나 설정합니다.Gets or sets a ColorInterpolationMode enumeration that specifies how the gradient's colors are interpolated.

public:
 property System::Windows::Media::ColorInterpolationMode ColorInterpolationMode { System::Windows::Media::ColorInterpolationMode get(); void set(System::Windows::Media::ColorInterpolationMode value); };
public System.Windows.Media.ColorInterpolationMode ColorInterpolationMode { get; set; }
member this.ColorInterpolationMode : System.Windows.Media.ColorInterpolationMode with get, set
Public Property ColorInterpolationMode As ColorInterpolationMode

속성 값

그라데이션의 색을 보간하는 방법을 지정합니다.Specifies how the colors in a gradient are interpolated. 기본값은 SRgbLinearInterpolation입니다.The default is SRgbLinearInterpolation.

예제

다음 예제에서는 보간 다른 색 공간에서 발생 하는 색 보간과의 서로 다른 모드에 있는 두 개의 비슷한 그라데이션을 보여 줍니다.The following example shows two similar gradients that have different modes of color interpolation, which causes the interpolation to happen in different color spaces.

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel>

    <Rectangle Width="200" Height="100" Margin="10">
      <Rectangle.Fill>

        <!-- This gradient uses a ColorInterpolationMode of "ScRgbLinearInterpolation"
             which indicates that the colors of the gradient are interpolated using the
             ScRGB color space. -->
        <LinearGradientBrush ColorInterpolationMode="ScRgbLinearInterpolation" 
        StartPoint="0,0.5" EndPoint="1,0.5">
          <LinearGradientBrush.GradientStops>
            <GradientStop Color="Blue" Offset="0.0" />
            <GradientStop Color="Red" Offset="0.25" />
            <GradientStop Color="Blue" Offset="0.75" />
            <GradientStop Color="LimeGreen" Offset="1" />
          </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

    <Rectangle Width="200" Height="100" Margin="10">
      <Rectangle.Fill>

        <!-- This gradient uses a ColorInterpolationMode of "SRgbLinearInterpolation"
             which indicates that the colors of the gradient are interpolated using the
             sRGB color space. -->
        <LinearGradientBrush ColorInterpolationMode="SRgbLinearInterpolation" 
        StartPoint="0,0.5" EndPoint="1,0.5">
          <LinearGradientBrush.GradientStops>
            <GradientStop Color="Blue" Offset="0.0" />
            <GradientStop Color="Red" Offset="0.25" />
            <GradientStop Color="Blue" Offset="0.75" />
            <GradientStop Color="LimeGreen" Offset="1" />
          </LinearGradientBrush.GradientStops>
        </LinearGradientBrush>
      </Rectangle.Fill>
    </Rectangle>

  </StackPanel>
</Page>

다음 그림에서는 앞의 예제에서 생성 하는 내용을 보여 줍니다.The following illustration shows what the preceding example produces.

서로 다른 보간 모드를 보여 주는 두 그라데이션Two gradients showing different interpolation mode

설명

종속성 속성 정보Dependency Property Information

식별자 필드Identifier field ColorInterpolationModeProperty
메타 데이터 속성 설정 trueMetadata properties set to true 없음None

적용 대상