GradientBrush 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個描述梯度的抽象類別,由梯度停止點組成。
public ref class GradientBrush : Brush
/// [Microsoft.UI.Xaml.Markup.ContentProperty(Name="GradientStops")]
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.UI.Xaml.WinUIContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GradientBrush : Brush
[Microsoft.UI.Xaml.Markup.ContentProperty(Name="GradientStops")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.UI.Xaml.WinUIContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class GradientBrush : Brush
Public Class GradientBrush
Inherits Brush
- 繼承
- 衍生
- 屬性
備註
使用 GradientStops 屬性來描述 LinearGradientBrush 的色彩組成,每個 GradientStop 指定一個顏色和一個偏移。 每個 偏移 值應該介於 0 到 1 之間。
色彩 值可以是任何以命名顏色或轉換語法表達的值。
GradientBrush 衍生類別
GradientBrush 是 LinearGradientBrush 的父類別。
建構函式
| 名稱 | Description |
|---|---|
| GradientBrush() |
提供 GradientBrush 衍生類別的基底類別初始化行為。 |
屬性
| 名稱 | Description |
|---|---|
| ColorInterpolationMode |
取得或設定一個 ColorInterpolationMode 的列舉值,指定漸層顏色如何插值。 |
| ColorInterpolationModeProperty |
識別 ColorInterpolationMode 依賴性屬性。 |
| Dispatcher |
它總是在 Windows 應用程式 SDK 應用程式中回傳 |
| DispatcherQueue |
得到 |
| GradientStops |
可以設定或設定筆刷的漸層停止。 |
| GradientStopsProperty |
識別 GradientStops 依賴屬性。 |
| MappingMode |
取得或設定一個 BrushMappingMode 的列舉值,指定梯度刷子的位置座標是絕對座標還是相對於輸出區域。 |
| MappingModeProperty |
識別 MappingMode 相依屬性。 |
| Opacity |
取得或設定 筆刷的不透明度程度。 (繼承來源 Brush) |
| RelativeTransform |
取得或設定使用相對座標套用到筆刷上的轉換。 (繼承來源 Brush) |
| SpreadMethod |
取得或設定一種擴散方法,指定如何繪製一個從要繪製物件範圍內開始或結束的漸層。 |
| SpreadMethodProperty |
識別 SpreadMethod 依賴性屬性。 |
| Transform |
取得或設定套用到畫筆上的轉換。 (繼承來源 Brush) |
方法
| 名稱 | Description |
|---|---|
| ClearValue(DependencyProperty) |
清除依賴性財產的局部價值。 (繼承來源 DependencyObject) |
| GetAnimationBaseValue(DependencyProperty) |
回傳任何為相依屬性建立的基礎值,適用於動畫未啟用時。 (繼承來源 DependencyObject) |
| GetValue(DependencyProperty) |
回傳 DependencyObject 中相依屬性的當前有效值。 (繼承來源 DependencyObject) |
| PopulatePropertyInfo(String, AnimationPropertyInfo) |
定義了一個可以被動畫化的屬性。 (繼承來源 Brush) |
| PopulatePropertyInfoOverride(String, AnimationPropertyInfo) |
當在派生類別中覆寫時,定義了一個可被動畫化的屬性。 (繼承來源 Brush) |
| ReadLocalValue(DependencyProperty) |
若設定了本地值,則回傳依賴性質的局部值。 (繼承來源 DependencyObject) |
| RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback) |
註冊一個通知函式,用於監聽此 DependencyObject 實例中特定 DependencyProperty 的變更。 (繼承來源 DependencyObject) |
| SetValue(DependencyProperty, Object) |
將相依屬性的局部值設定在 DependencyObject 上。 (繼承來源 DependencyObject) |
| UnregisterPropertyChangedCallback(DependencyProperty, Int64) |
取消先前透過呼叫 RegisterPropertyChangedCallback 註冊的變更通知。 (繼承來源 DependencyObject) |