提供一組可用於裝飾項的常用筆刷。
繼承階層架構
System.Object
Microsoft.Windows.Design.Interaction.AdornerColors
命名空間: Microsoft.Windows.Design.Interaction
組件: Microsoft.Windows.Design.Interaction (在 Microsoft.Windows.Design.Interaction.dll 中)
語法
'宣告
Public NotInheritable Class AdornerColors
public static class AdornerColors
public ref class AdornerColors abstract sealed
[<AbstractClass>]
[<Sealed>]
type AdornerColors = class end
public final class AdornerColors
AdornerColors 型別會公開下列成員。
屬性
| 名稱 | 說明 | |
|---|---|---|
![]() ![]() |
AlignmentMarkBrush | 取得用於對齊標記的筆刷。 |
![]() ![]() |
AlignmentMarkBrushKey | 取得對齊標記之色彩的資源索引鍵。 |
![]() ![]() |
AlignmentMarkColor | 取得用於對齊標記的色彩。 |
![]() ![]() |
AlignmentMarkColorKey | 取得對齊標記之色彩的資源索引鍵。 |
![]() ![]() |
ElementBorderBrush | 取得用於項目框線的筆刷。 |
![]() ![]() |
ElementBorderBrushKey | 取得項目框線之筆刷的資源索引鍵。 |
![]() ![]() |
ElementBorderColor | 取得用於項目框線的色彩。 |
![]() ![]() |
ElementBorderColorKey | 取得項目框線之色彩的資源索引鍵。 |
![]() ![]() |
GlyphFillBrush | 取得用於任何圖像 (Glyph) 之填滿的筆刷。 |
![]() ![]() |
GlyphFillBrushKey | 取得用於填滿圖像之筆刷的資源索引鍵。 |
![]() ![]() |
GlyphFillColor | 取得用於任何圖像之填滿的色彩。 |
![]() ![]() |
GlyphFillColorKey | 取得用於填滿圖像之色彩的資源索引鍵。 |
![]() ![]() |
HandleBorderBrush | 取得用來繪製控點框線的筆刷。 |
![]() ![]() |
HandleBorderBrushKey | 取得控點框線之筆刷的資源索引鍵。 |
![]() ![]() |
HandleBorderColor | 取得控點框線的色彩。 |
![]() ![]() |
HandleBorderColorKey | 取得控點框線之色彩的資源索引鍵。 |
![]() ![]() |
HandleEmptyFillBrush | 取得當無法調整控點的大小時,用來繪製控點之填滿的筆刷。 |
![]() ![]() |
HandleEmptyFillBrushKey | 取得當無法調整控點的大小時,控點之筆刷的資源索引鍵。 |
![]() ![]() |
HandleEmptyFillColor | 取得控點不可調整大小時的色彩。 |
![]() ![]() |
HandleEmptyFillColorKey | 取得當無法調整控點的大小時,控點之色彩的資源索引鍵。 |
![]() ![]() |
HandleFillBrush | 取得用來繪製控點之填滿的筆刷。 |
![]() ![]() |
HandleFillBrushKey | 取得控點之筆刷的資源索引鍵。 |
![]() ![]() |
HandleFillColor | 取得控點的色彩。 |
![]() ![]() |
HandleFillColorKey | 取得控點之色彩的資源索引鍵。 |
![]() ![]() |
HandleFillHoverBrush | 取得當滑鼠指標位於控點上方時,用來繪製控點之填滿的筆刷。 |
![]() ![]() |
HandleFillHoverBrushKey | 取得當滑鼠指標位於控點上方時,控點之筆刷的資源索引鍵。 |
![]() ![]() |
HandleFillHoverColor | 取得當滑鼠指標位於控點上方時,控點的色彩。 |
![]() ![]() |
HandleFillHoverColorKey | 取得當滑鼠指標位於控點上方時,控點之色彩的資源索引鍵。 |
![]() ![]() |
HandleFillPressedBrush | 取得按下控點時,用來繪製控點之填滿的筆刷。 |
![]() ![]() |
HandleFillPressedBrushKey | 取得按下控點時,控點之筆刷的資源索引鍵。 |
![]() ![]() |
HandleFillPressedColor | 取得按下控點時,控點的色彩。 |
![]() ![]() |
HandleFillPressedColorKey | 取得按下控點時,控點之色彩的資源索引鍵。 |
![]() ![]() |
MoveHandleContentBrush | 取得用於移動控制軸之內容的筆刷。 |
![]() ![]() |
MoveHandleContentBrushKey | 取得用於移動控制軸內容之筆刷的資源索引鍵。 |
![]() ![]() |
MoveHandleContentColor | 取得用於移動控制軸之內容的色彩。 |
![]() ![]() |
MoveHandleContentColorKey | 取得用於移動控制軸內容之色彩的資源索引鍵。 |
![]() ![]() |
MoveHandleFillBrush | 取得當滑鼠指標不在移動控制軸上方時,用於移動控制軸之填滿的筆刷。 |
![]() ![]() |
MoveHandleFillBrushKey | 取得當滑鼠指標不在移動控制軸上方時,用於移動控制軸之填滿的筆刷之資源索引鍵。 |
![]() ![]() |
MoveHandleFillColor | 取得當滑鼠指標不在移動控制軸上方時,用於填滿移動控制軸的色彩。 |
![]() ![]() |
MoveHandleFillColorKey | 取得當滑鼠指標不在移動控制軸上方時,用於填滿移動控制軸之色彩的資源索引鍵。 |
![]() ![]() |
MoveHandleFillHoverBrush | 取得當滑鼠指標位於移動控制軸上方時,用於移動控制軸之填滿的筆刷。 |
![]() ![]() |
MoveHandleFillHoverBrushKey | 取得當滑鼠指標位於移動控制軸上方時,用於移動控制軸之填滿的筆刷之資源索引鍵。 |
![]() ![]() |
MoveHandleFillHoverColor | 取得當滑鼠指標位於移動控制軸上方時,用於填滿移動控制軸的色彩。 |
![]() ![]() |
MoveHandleFillHoverColorKey | 取得當滑鼠指標位於移動控制軸上方時,用於填滿移動控制軸之色彩的資源索引鍵。 |
![]() ![]() |
RailFillBrush | 取得滑軌的填滿筆刷。 |
![]() ![]() |
RailFillBrushKey | 取得用於滑軌之筆刷的資源索引鍵。 |
![]() ![]() |
RailFillColor | 取得滑軌的填滿色彩。 |
![]() ![]() |
RailFillColorKey | 取得用於滑軌之色彩的資源索引鍵。 |
![]() ![]() |
SelectionFrameBorderBrush | 取得用於控制項周圍之選取框架的筆刷。 |
![]() ![]() |
SelectionFrameBorderBrushKey | 取得用於控制項周圍選取框架之筆刷的資源索引鍵。 |
![]() ![]() |
SelectionFrameBorderColor | 取得用於控制項周圍之選取框架的色彩。 |
![]() ![]() |
SelectionFrameBorderColorKey | 取得用於控制項周圍選取框架之色彩的資源索引鍵。 |
![]() ![]() |
SelectionFrameFillBrush | 取得用於控制項周圍之選取框架的填滿筆刷。 |
![]() ![]() |
SelectionFrameFillBrushKey | 取得用於控制項周圍選取框架之筆刷的資源索引鍵。 |
![]() ![]() |
SelectionFrameFillColor | 取得用於控制項周圍之選取框架的填滿色彩。 |
![]() ![]() |
SelectionFrameFillColorKey | 取得用於控制項周圍選取框架之色彩的資源索引鍵。 |
![]() ![]() |
SimpleWashBrush | 會取得簡單的塗刷。 |
![]() ![]() |
SimpleWashBrushKey | 取得用於簡單塗刷之筆刷的資源索引鍵。 |
![]() ![]() |
SimpleWashColor | 會取得簡單的塗刷色彩。 |
![]() ![]() |
SimpleWashColorKey | 取得用於簡單塗刷之色彩的資源索引鍵。 |
![]() ![]() |
ToggledGlyphFillBrush | 取得已切換圖像之填滿的筆刷。 |
![]() ![]() |
ToggledGlyphFillBrushKey | 取得用於填滿已切換圖像之筆刷的資源索引鍵。 |
![]() ![]() |
ToggledGlyphFillColor | 取得已切換圖像之填滿的色彩。 |
![]() ![]() |
ToggledGlyphFillColorKey | 取得用於填滿已切換圖像之色彩的資源索引鍵。 |
回頁首
備註
您可以使用 AdornerColors 類別,將自訂裝飾項控制項的外觀標準化。 藉由使用這個預先定義的一組色彩,您自訂的裝飾項都可以參與 WPF 設計工具的色彩配置。
範例
在下列程式碼範例中,會說明如何使用 AdornerColors 類別,將 Slider 控制項的 Background 設定為標準裝飾項色彩。 如需詳細資訊,請參閱逐步解說:在控制項中實作滑軌。
' Set the slider's background to the rail fill color.
skewSlider.Background = AdornerColors.RailFillBrush
// Set the slider's background to the rail fill color.
skewSlider.Background = AdornerColors.RailFillBrush;
在下列程式碼範例中,會說明如何使用 AdornerResources 類別,將 CheckBox 控制項的 Background 設定為標準裝飾項色彩。 如需詳細資訊,請參閱逐步解說:在設計階段偵錯 WPF 自訂控制項。
' The constructor sets up the adorner control.
Public Sub New()
autoSizeCheckBox = New CheckBox()
autoSizeCheckBox.Content = "AutoSize"
autoSizeCheckBox.IsChecked = True
autoSizeCheckBox.FontFamily = AdornerFonts.FontFamily
autoSizeCheckBox.FontSize = AdornerFonts.FontSize
autoSizeCheckBox.Background = CType( _
AdornerResources.FindResource(AdornerColors.RailFillBrushKey), _
Brush)
End Sub
// The constructor sets up the adorner control.
public AutoSizeAdornerProvider()
{
autoSizeCheckBox = new CheckBox();
autoSizeCheckBox.Content = "AutoSize";
autoSizeCheckBox.IsChecked = true;
autoSizeCheckBox.FontFamily = AdornerFonts.FontFamily;
autoSizeCheckBox.FontSize = AdornerFonts.FontSize;
autoSizeCheckBox.Background = AdornerResources.FindResource(
AdornerColors.RailFillBrushKey) as Brush;
}
執行緒安全
這個型別的任何 Public static (在 Visual Basic 中為 Shared) 成員都具備執行緒安全。並非所有的執行個體成員都是安全執行緒。
請參閱
參考
Microsoft.Windows.Design.Interaction 命名空間
PrimarySelectionAdornerProvider
.gif)
.gif)