AnchorEditor 類別

定義

重要

此 API 不符合 CLS 規範。

提供設定 Anchor 屬性的使用者介面。

public ref class AnchorEditor sealed : System::Drawing::Design::UITypeEditor
public sealed class AnchorEditor : System.Drawing.Design.UITypeEditor
[System.CLSCompliant(false)]
public sealed class AnchorEditor : System.Drawing.Design.UITypeEditor
type AnchorEditor = class
    inherit UITypeEditor
[<System.CLSCompliant(false)>]
type AnchorEditor = class
    inherit UITypeEditor
Public NotInheritable Class AnchorEditor
Inherits UITypeEditor
繼承
AnchorEditor
屬性

範例

下列程式碼範例會使用 EditorAttribute ,將 與 屬性產生關聯 AnchorEditor

public:
   [EditorAttribute(System::ComponentModel::Design::CollectionEditor::typeid,
      System::Drawing::Design::UITypeEditor::typeid)]
   property System::Windows::Forms::AnchorStyles testAnchor 
   {
      System::Windows::Forms::AnchorStyles get()
      {
         return anchor;
      }
      void set( System::Windows::Forms::AnchorStyles value )
      {
         anchor = value;
      }
   }
private:
   AnchorStyles anchor;
[EditorAttribute(typeof(System.Windows.Forms.Design.AnchorEditor), typeof(System.Drawing.Design.UITypeEditor))]
public System.Windows.Forms.AnchorStyles testAnchor
{
    get
    {
        return anchor;
    }
    set
    {
        anchor = value;
    }
}
private AnchorStyles anchor;
<EditorAttribute(GetType(System.Windows.Forms.Design.AnchorEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testAnchor() As System.Windows.Forms.AnchorStyles
   Get
      Return anchor
   End Get
   Set
      anchor = value
   End Set
End Property
Private anchor As AnchorStyles

備註

AnchorEditor提供用於設定 Anchor 屬性的設計階段使用者介面。 Anchor屬性通常用來判斷控制項所系結容器的哪一端。 這個類別提供下拉式圖形控制項,可讓使用者指定要錨定控制項所在容器的哪一端。

建構函式

AnchorEditor()

初始化 AnchorEditor 類別的新執行個體。

屬性

IsDropDownResizable

取得值,表示使用者是否能夠調整下拉式編輯器的大小。

(繼承來源 UITypeEditor)

方法

EditValue(IServiceProvider, Object)

使用由 GetEditStyle() 方法指示的編輯器樣式,來編輯指定物件的值。

(繼承來源 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用指定服務提供者和內容,編輯指定物件的值。

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetEditStyle()

取得 EditValue(IServiceProvider, Object) 方法所使用的編輯器樣式。

(繼承來源 UITypeEditor)
GetEditStyle(ITypeDescriptorContext)

取得 EditValue(ITypeDescriptorContext, IServiceProvider, Object) 方法所使用的編輯器樣式。

GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetPaintValueSupported()

指出這個編輯器是否支援繪製物件值的表示。

(繼承來源 UITypeEditor)
GetPaintValueSupported(ITypeDescriptorContext)

指出指定的內容是否支援在指定的內容中繪製物件值的表示。

(繼承來源 UITypeEditor)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
PaintValue(Object, Graphics, Rectangle)

將指定物件的表示值繪製到指定的畫布上。

(繼承來源 UITypeEditor)
PaintValue(PaintValueEventArgs)

使用指定的 PaintValueEventArgs 來繪製物件值的表示。

(繼承來源 UITypeEditor)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於

另請參閱