Brush 類別

定義

定義繪製區域的核心行為和內建色彩。

public ref class Brush abstract : Microsoft::Maui::Controls::Element
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BrushTypeConverter))]
public abstract class Brush : Microsoft.Maui.Controls.Element
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BrushTypeConverter))>]
type Brush = class
    inherit Element
Public MustInherit Class Brush
Inherits Element
繼承
衍生
屬性

備註

衍生類別描述繪製區域的不同方式。

建構函式

Brush()

定義繪製區域的核心行為和內建色彩。

屬性

AliceBlue

SolidColorBrush取得系統定義的色彩 AliceBlue

AntiqueWhite

SolidColorBrush取得系統定義的色彩 AntiqueWhite

Aqua

SolidColorBrush取得系統定義的色彩 Aqua

Aquamarine

SolidColorBrush取得系統定義的色彩 Aquamarine

AutomationId

取得或設定值,允許自動化架構尋找此項目並與之互動。

(繼承來源 Element)
Azure

SolidColorBrush取得系統定義的色彩 Azure

Beige

SolidColorBrush取得系統定義的色彩 Beige

BindingContext

取得或設定 對象,這個物件包含系結屬性所屬之系結屬性的目標屬性 BindableObject。 這是可繫結屬性。

(繼承來源 BindableObject)
Bisque

SolidColorBrush取得系統定義的色彩 Bisque

Black

SolidColorBrush取得系統定義的色彩 Black

BlanchedAlmond

SolidColorBrush取得系統定義的色彩 BlanchedAlmond

Blue

SolidColorBrush取得系統定義的色彩 Blue

BlueViolet

SolidColorBrush取得系統定義的色彩 BlueViolet

Brown

SolidColorBrush取得系統定義的色彩 Brown

BurlyWood

SolidColorBrush取得系統定義的色彩 BurlyWood

CadetBlue

SolidColorBrush取得系統定義的色彩 CadetBlue

Chartreuse

SolidColorBrush取得系統定義的色彩 Chartreuse

Chocolate

SolidColorBrush取得系統定義的色彩 Chocolate

ClassId

取得或設定值,用來識別語意類似項目的集合。

(繼承來源 Element)
Coral

SolidColorBrush取得系統定義的色彩 Coral

CornflowerBlue

SolidColorBrush取得系統定義的色彩 CornflowerBlue

Cornsilk

SolidColorBrush取得系統定義的色彩 Cornsilk

Crimson

SolidColorBrush取得系統定義的色彩 Crimson

Cyan

SolidColorBrush取得系統定義的色彩 Cyan

DarkBlue

SolidColorBrush取得系統定義的色彩 DarkBlue

DarkCyan

SolidColorBrush取得系統定義的色彩 DarkCyan

DarkGoldenrod

SolidColorBrush取得系統定義的色彩 DarkGoldenrod

DarkGray

SolidColorBrush取得系統定義的色彩 DarkGray

DarkGreen

SolidColorBrush取得系統定義的色彩 DarkGreen

DarkKhaki

SolidColorBrush取得系統定義的色彩 DarkKhaki

DarkMagenta

SolidColorBrush取得系統定義的色彩 DarkMagenta

DarkOliveGreen

SolidColorBrush取得系統定義的色彩 DarkOliveGreen

DarkOrange

SolidColorBrush取得系統定義的色彩 DarkOrange

DarkOrchid

SolidColorBrush取得系統定義的色彩 DarkOrchid

DarkRed

SolidColorBrush取得系統定義的色彩 DarkRed

DarkSalmon

SolidColorBrush取得系統定義的色彩 DarkSalmon

DarkSeaGreen

SolidColorBrush取得系統定義的色彩 DarkSeaGreen

DarkSlateBlue

SolidColorBrush取得系統定義的色彩 DarkSlateBlue

DarkSlateGray

SolidColorBrush取得系統定義的色彩 DarkSlateGray

DarkTurquoise

SolidColorBrush取得系統定義的色彩 DarkTurquoise

DarkViolet

SolidColorBrush取得系統定義的色彩 DarkViolet

DeepPink

SolidColorBrush取得系統定義的色彩 DeepPink

DeepSkyBlue

SolidColorBrush取得系統定義的色彩 DeepSkyBlue

Default

表示預設 (空白) 筆刷。

DimGray

SolidColorBrush取得系統定義的色彩 DimGray

Dispatcher

取得建立這個可系結物件時可用的發送器,否則會嘗試尋找最接近的可用發送器, (可能是視窗/應用程式的) 。

(繼承來源 BindableObject)
DodgerBlue

SolidColorBrush取得系統定義的色彩 DodgerBlue

EffectControlProvider

供 .NET MAUI 內部使用。

(繼承來源 Element)
Effects

取得或設定將在運行時間套用至項目的樣式和屬性。

(繼承來源 Element)
Firebrick

SolidColorBrush取得系統定義的色彩 Firebrick

FloralWhite

SolidColorBrush取得系統定義的色彩 FloralWhite

ForestGreen

SolidColorBrush取得系統定義的色彩 ForestGreen

Fuchsia

SolidColorBrush取得系統定義的色彩 Fuchsia

Gainsboro

SolidColorBrush取得系統定義的色彩 Gainsboro

GhostWhite

SolidColorBrush取得系統定義的色彩 GhostWhite

Gold

SolidColorBrush取得系統定義的色彩 Gold

Goldenrod

SolidColorBrush取得系統定義的色彩 Goldenrod

Gray

SolidColorBrush取得系統定義的色彩 Gray

Green

SolidColorBrush取得系統定義的色彩 Green

GreenYellow

SolidColorBrush取得系統定義的色彩 GreenYellow

Handler

取得或設定這個項目的相關處理程式。

(繼承來源 Element)
Honeydew

SolidColorBrush取得系統定義的色彩 Honeydew

HotPink

SolidColorBrush取得系統定義的色彩 HotPink

Id

取得值,這個值可用來在應用程式執行期間唯一識別專案。

(繼承來源 Element)
IndianRed

SolidColorBrush取得系統定義的色彩 IndianRed

Indigo

SolidColorBrush取得系統定義的色彩 Indigo

IsEmpty

在衍生類別中覆寫時,指出指定的筆刷是否代表空的筆刷。

Ivory

SolidColorBrush取得系統定義的色彩 Ivory

Khaki

SolidColorBrush取得系統定義的色彩 Khaki

Lavender

SolidColorBrush取得系統定義的色彩 Lavender

LavenderBlush

SolidColorBrush取得系統定義的色彩 LavenderBlush

LawnGreen

SolidColorBrush取得系統定義的色彩 LawnGreen

LemonChiffon

SolidColorBrush取得系統定義的色彩 LemonChiffon

LightBlue

SolidColorBrush取得系統定義的色彩 LightBlue

LightCoral

SolidColorBrush取得系統定義的色彩 LightCoral

LightCyan

SolidColorBrush取得系統定義的色彩 LightCyan

LightGoldenrodYellow

SolidColorBrush取得系統定義的色彩 LightGoldenrodYellow

LightGray

SolidColorBrush取得系統定義的色彩 LightGray

LightGreen

SolidColorBrush取得系統定義的色彩 LightGreen

LightPink

SolidColorBrush取得系統定義的色彩 LightPink

LightSalmon

SolidColorBrush取得系統定義的色彩 LightSalmon

LightSeaGreen

SolidColorBrush取得系統定義的色彩 LightSeaGreen

LightSkyBlue

SolidColorBrush取得系統定義的色彩 LightSkyBlue

LightSlateGray

SolidColorBrush取得系統定義的色彩 LightSlateGray

LightSteelBlue

SolidColorBrush取得系統定義的色彩 LightSteelBlue

LightYellow

SolidColorBrush取得系統定義的色彩 LightYellow

Lime

SolidColorBrush取得系統定義的色彩 Lime

LimeGreen

SolidColorBrush取得系統定義的色彩 LimeGreen

Linen

SolidColorBrush取得系統定義的色彩 Linen

LogicalChildren
已淘汰.

供 Microsoft.Maui.Controls 平台內部使用。

(繼承來源 Element)
Magenta

SolidColorBrush取得系統定義的色彩 Magenta

Maroon

SolidColorBrush取得系統定義的色彩 Maroon

MediumAquamarine

SolidColorBrush取得系統定義的色彩 MediumAquamarine

MediumBlue

SolidColorBrush取得系統定義的色彩 MediumBlue

MediumOrchid

SolidColorBrush取得系統定義的色彩 MediumOrchid

MediumPurple

SolidColorBrush取得系統定義的色彩 MediumPurple

MediumSeaGreen

SolidColorBrush取得系統定義的色彩 MediumSeaGreen

MediumSlateBlue

SolidColorBrush取得系統定義的色彩 MediumSlateBlue

MediumSpringGreen

SolidColorBrush取得系統定義的色彩 MediumSpringGreen

MediumTurquoise

SolidColorBrush取得系統定義的色彩 MediumTurquoise

MediumVioletRed

SolidColorBrush取得系統定義的色彩 MediumVioletRed

MidnightBlue

SolidColorBrush取得系統定義的色彩 MidnightBlue

MintCream

SolidColorBrush取得系統定義的色彩 MintCream

MistyRose

SolidColorBrush取得系統定義的色彩 MistyRose

Moccasin

SolidColorBrush取得系統定義的色彩 Moccasin

NavajoWhite

SolidColorBrush取得系統定義的色彩 NavajoWhite

Navy

SolidColorBrush取得系統定義的色彩 Navy

OldLace

SolidColorBrush取得系統定義的色彩 OldLace

Olive

SolidColorBrush取得系統定義的色彩 Olive

OliveDrab

SolidColorBrush取得系統定義的色彩 OliveDrab

Orange

SolidColorBrush取得系統定義的色彩 Orange

OrangeRed

SolidColorBrush取得系統定義的色彩 OrangeRed

Orchid

SolidColorBrush取得系統定義的色彩 Orchid

PaleGoldenrod

SolidColorBrush取得系統定義的色彩 PaleGoldenrod

PaleGreen

SolidColorBrush取得系統定義的色彩 PaleGreen

PaleTurquoise

SolidColorBrush取得系統定義的色彩 PaleTurquoise

PaleVioletRed

SolidColorBrush取得系統定義的色彩 PaleVioletRed

PapayaWhip

SolidColorBrush取得系統定義的色彩 PapayaWhip

Parent

取得或設定這個專案的父 Element 代。

(繼承來源 Element)
PeachPuff

SolidColorBrush取得系統定義的色彩 PeachPuff

Peru

SolidColorBrush取得系統定義的色彩 Peru

Pink

SolidColorBrush取得系統定義的色彩 Pink

Plum

SolidColorBrush取得系統定義的色彩 Plum

PowderBlue

SolidColorBrush取得系統定義的色彩 PowderBlue

Purple

SolidColorBrush取得系統定義的色彩 Purple

RealParent

供 .NET MAUI 內部使用。

(繼承來源 Element)
Red

SolidColorBrush取得系統定義的色彩 Red

RosyBrown

SolidColorBrush取得系統定義的色彩 RosyBrown

RoyalBlue

SolidColorBrush取得系統定義的色彩 RoyalBlue

SaddleBrown

SolidColorBrush取得系統定義的色彩 SaddleBrown

Salmon

SolidColorBrush取得系統定義的色彩 Salmon

SandyBrown

SolidColorBrush取得系統定義的色彩 SandyBrown

SeaGreen

SolidColorBrush取得系統定義的色彩 SeaGreen

SeaShell

SolidColorBrush取得系統定義的色彩 SeaShell

Sienna

SolidColorBrush取得系統定義的色彩 Sienna

Silver

SolidColorBrush取得系統定義的色彩 Silver

SkyBlue

SolidColorBrush取得系統定義的色彩 SkyBlue

SlateBlue

SolidColorBrush取得系統定義的色彩 SlateBlue

SlateGray

SolidColorBrush取得系統定義的色彩 SlateGray

Snow

SolidColorBrush取得系統定義的色彩 Snow

SpringGreen

SolidColorBrush取得系統定義的色彩 SpringGreen

SteelBlue

SolidColorBrush取得系統定義的色彩 SteelBlue

StyleId

取得或設定使用者定義值來唯一識別項目。

(繼承來源 Element)
Tan

SolidColorBrush取得系統定義的色彩 Tan

Teal

SolidColorBrush取得系統定義的色彩 Teal

Thistle

SolidColorBrush取得系統定義的色彩 Thistle

Tomato

SolidColorBrush取得系統定義的色彩 Tomato

Transparent

SolidColorBrush取得系統定義的色彩 Transparent

Turquoise

SolidColorBrush取得系統定義的色彩 Turquoise

Violet

SolidColorBrush取得系統定義的色彩 Violet

Wheat

SolidColorBrush取得系統定義的色彩 Wheat

White

SolidColorBrush取得系統定義的色彩 White

WhiteSmoke

SolidColorBrush取得系統定義的色彩 WhiteSmoke

Yellow

SolidColorBrush取得系統定義的色彩 Yellow

YellowGreen

SolidColorBrush取得系統定義的色彩 YellowGreen

方法

AddLogicalChild(Element)

Element將加入邏輯子系。

(繼承來源 Element)
ApplyBindings()

將所有目前的系結套用至 BindingContext

(繼承來源 BindableObject)
ClearLogicalChildren()

拿掉所有子 Element系。

(繼承來源 Element)
ClearValue(BindableProperty)

清除先前為可系結屬性設定的任何值。

(繼承來源 BindableObject)
ClearValue(BindablePropertyKey)

清除先前針對可系結屬性設定的任何值,其索引鍵所識別。

(繼承來源 BindableObject)
CoerceValue(BindableProperty)

強制指定可系結屬性的值。 這是藉由叫 BindableProperty.CoerceValueDelegate 用指定的可系結屬性來完成。

(繼承來源 BindableObject)
CoerceValue(BindablePropertyKey)

強制指定可系結屬性的值。 這是藉由叫 BindableProperty.CoerceValueDelegate 用指定的可系結屬性來完成。

(繼承來源 BindableObject)
EffectIsAttached(String)

供 .NET MAUI 內部使用。

(繼承來源 Element)
FindByName(String)

傳回具有指定名稱的元素。

(繼承來源 Element)
GetValue(BindableProperty)

傳回包含在指定可系結屬性中的值。

(繼承來源 BindableObject)
InsertLogicalChild(Int32, Element)

Element 插入至位於指定索引處的邏輯子系。

(繼承來源 Element)
IsNullOrEmpty(Brush)

指出指定的 Brush 是否為 null 或空白。

IsSet(BindableProperty)

判斷可系結屬性是否存在且已設定值。

(繼承來源 BindableObject)
OnBindingContextChanged()

只要項目的繫結內容變更時就叫用。 實作這個方法可為此事件加入類別處理。

(繼承來源 Element)
OnChildAdded(Element)

引發 ChildAdded 事件。 實作這個方法可為此事件加入類別處理。

(繼承來源 Element)
OnChildRemoved(Element, Int32)

引發 ChildRemoved 事件。 實作這個方法以新增此事件的類別處理

(繼承來源 Element)
OnHandlerChanged()

在衍生類別中覆寫時,應該引發 HandlerChanged 事件。

(繼承來源 Element)
OnHandlerChanging(HandlerChangingEventArgs)

在衍生類別中覆寫時,應該引發 HandlerChanging 事件。

(繼承來源 Element)
OnParentChanged()

在衍生類別中覆寫時,應該引發 ParentChanged 事件。

(繼承來源 Element)
OnParentChanging(ParentChangingEventArgs)

在衍生類別中覆寫時,應該引發 ParentChanging 事件。

(繼承來源 Element)
OnParentSet()

引發內部) 事件 (ParentSet 。 實作這個方法,以便在項目新增至父系時新增行為。

(繼承來源 Element)
OnPropertyChanged(String)

繫結屬性變更時呼叫的方法。

(繼承來源 Element)
OnPropertyChanging(String)

引發 PropertyChanging 事件。

(繼承來源 BindableObject)
RemoveBinding(BindableProperty)

從可系結的屬性中移除先前設定的系結。

(繼承來源 BindableObject)
RemoveDynamicResource(BindableProperty)

拿掉先前設定的動態資源。

(繼承來源 Element)
RemoveLogicalChild(Element)

從邏輯子系中移除第一個出現的特定 Element 專案。

(繼承來源 Element)
SetBinding(BindableProperty, BindingBase)

將系結指派給可系結的屬性。

(繼承來源 BindableObject)
SetDynamicResource(BindableProperty, String)

使用提供的索引鍵, BindableProperty 設定要透過 DynamicResource 更新這個項目的 屬性。

(繼承來源 Element)
SetValue(BindableProperty, Object)

設定指定之可系結屬性的值。

(繼承來源 BindableObject)
SetValue(BindablePropertyKey, Object)

設定指定之可系結屬性的值。

(繼承來源 BindableObject)
SetValueCore(BindableProperty, Object, SetValueFlags)

供 Microsoft.Maui.Controls 平台內部使用。

(繼承來源 BindableObject)
SetValueFromRenderer(BindableProperty, Object)

供 .NET MAUI 內部使用。

(繼承來源 Element)
SetValueFromRenderer(BindablePropertyKey, Object)

供 .NET MAUI 內部使用。

(繼承來源 Element)
UnapplyBindings()

從目前內容中移除所有目前的系結。

(繼承來源 BindableObject)

運算子

Implicit(Brush to Paint)

定義繪製區域的核心行為和內建色彩。

Implicit(Color to Brush)

定義繪製區域的核心行為和內建色彩。

Implicit(Paint to Brush)

定義繪製區域的核心行為和內建色彩。

事件

BindingContextChanged

發生於 BindingContext 屬性的值變更時。

(繼承來源 BindableObject)
ChildAdded

每當子專案加入至 項目時引發。

(繼承來源 Element)
ChildRemoved

每當從專案中移除子項目時引發。

(繼承來源 Element)
DescendantAdded

每當子專案加入至專案的子樹時引發。

(繼承來源 Element)
DescendantRemoved

每當從專案子樹中移除子項目時引發。

(繼承來源 Element)
HandlerChanged

每當項目的處理程式變更時引發。

(繼承來源 Element)
HandlerChanging

每當項目的處理程序開始變更時引發。

(繼承來源 Element)
ParentChanged

每當專案的父代變更時引發。

(繼承來源 Element)
ParentChanging

每當項目的 開始變更時引發。

(繼承來源 Element)
PropertyChanged

當屬性值變更時發生。

(繼承來源 BindableObject)
PropertyChanging

當屬性值變更中時發生。

(繼承來源 BindableObject)

明確介面實作

IContextFlyoutElement.ContextFlyout

ContextFlyout取得檢視的 。 功能表飛出視窗、功能表飛出視窗子專案,以及功能表飛出視窗分隔符可以新增至內容飛出視窗。

(繼承來源 Element)
IDynamicResourceHandler.SetDynamicResource(BindableProperty, String)

定義繪製區域的核心行為和內建色彩。

(繼承來源 BindableObject)
IEffectControlProvider.RegisterEffect(Effect)

定義繪製區域的核心行為和內建色彩。

(繼承來源 Element)
IElement.Parent

取得專案的父代。

(繼承來源 Element)
IElementController.Descendants()

供 .NET MAUI 內部使用。

(繼承來源 Element)
IElementController.LogicalChildren

供 .NET MAUI 內部使用。

(繼承來源 Element)
IElementController.SetValueFromRenderer(BindableProperty, Object)

供 .NET MAUI 內部使用。

(繼承來源 Element)
INameScope.RegisterName(String, Object)

供 .NET MAUI 內部使用。

(繼承來源 Element)
INameScope.UnregisterName(String)

供 .NET MAUI 內部使用。

(繼承來源 Element)
IToolTipElement.ToolTip

代表小型矩形彈出視窗,當使用者將指標放在檢視上時,顯示檢視用途的簡短描述。

(繼承來源 Element)
IVisualTreeElement.GetVisualChildren()

取得元素視覺子系的唯讀清單。

(繼承來源 Element)
IVisualTreeElement.GetVisualParent()

取得專案的可視化父代。

(繼承來源 Element)

擴充方法

GetPropertyIfSet<T>(BindableObject, BindableProperty, T)

定義繪製區域的核心行為和內建色彩。

SetAppTheme<T>(BindableObject, BindableProperty, T, T)

定義繪製區域的核心行為和內建色彩。

SetAppThemeColor(BindableObject, BindableProperty, Color, Color)

定義繪製區域的核心行為和內建色彩。

SetBinding(BindableObject, BindableProperty, String, BindingMode, IValueConverter, String)

建立並將繫結套用至屬性。

FindByName<T>(Element, String)

定義繪製區域的核心行為和內建色彩。

ToHandler(IElement, IMauiContext)

定義繪製區域的核心行為和內建色彩。

ToPlatform(IElement, IMauiContext)

定義繪製區域的核心行為和內建色彩。

GetVisualElementWindow(IVisualTreeElement)

如果專案包含在其中,則取得包含可視化樹狀結構專案的 Window。

GetVisualTreeDescendants(IVisualTreeElement)

取得子系的整個階層,做為指定可視化樹狀結構專案的子系列表。

GetVisualTreeElements(IVisualTreeElement, Point)

根據指定的Point取得視覺化樹狀結構專案的子系列表。

GetVisualTreeElements(IVisualTreeElement, Rect)

根據矩形取得可視化樹狀結構專案子系的清單。

GetVisualTreeElements(IVisualTreeElement, Double, Double)

根據指定的 x、y 點,取得可視化樹狀結構專案子系的清單。

GetVisualTreeElements(IVisualTreeElement, Double, Double, Double, Double)

根據以平台單位而非圖元指定的座標所定義的矩形,取得可視化樹狀結構專案子系的清單。

適用於