FontEditor 类

定义

重要

此 API 不符合 CLS。

提供用于选择和配置 Font 对象的用户界面。

public ref class FontEditor : System::Drawing::Design::UITypeEditor
public class FontEditor : System.Drawing.Design.UITypeEditor
[System.Security.SecurityCritical]
public class FontEditor : System.Drawing.Design.UITypeEditor
[System.CLSCompliant(false)]
public class FontEditor : System.Drawing.Design.UITypeEditor
type FontEditor = class
    inherit UITypeEditor
[<System.Security.SecurityCritical>]
type FontEditor = class
    inherit UITypeEditor
[<System.CLSCompliant(false)>]
type FontEditor = class
    inherit UITypeEditor
Public Class FontEditor
Inherits UITypeEditor
继承
FontEditor
属性

示例

下面的代码示例使用与 EditorAttribute 属性相关联 FontEditor

public:
   [EditorAttribute(System::ComponentModel::Design::CollectionEditor::typeid,
      System::Drawing::Design::UITypeEditor::typeid)]
   property System::Drawing::Font^ testFont 
   {
      System::Drawing::Font^ get()
      {
         return font;
      }
      void set( System::Drawing::Font^ value )
      {
         font = value;
      }
   }
private:
   Font^ font;
[EditorAttribute(typeof(System.Drawing.Design.FontEditor), typeof(System.Drawing.Design.UITypeEditor))]
public Font testFont
{
    get
    {
        return font;
    }
    set
    {
        font = value;
    }
}
private Font font;
<EditorAttribute(GetType(System.Drawing.Design.FontEditor), GetType(System.Drawing.Design.UITypeEditor))>  _
Public Property testFont() As Font
   Get
      Return font
   End Get
   Set
      font = value
   End Set
End Property
Private font As Font

注解

FontEditor 是一个 UITypeEditor 用户界面,用于从可用字体列表中选择和配置 Font

构造函数

名称 说明
FontEditor()

初始化 FontEditor 类的新实例。

属性

名称 说明
IsDropDownResizable

获取一个值,该值指示用户是否应调整下拉列表编辑器的大小。

(继承自 UITypeEditor)

方法

名称 说明
EditValue(IServiceProvider, Object)

使用方法指示 GetEditStyle() 的编辑器样式编辑指定对象的值。

(继承自 UITypeEditor)
EditValue(ITypeDescriptorContext, IServiceProvider, Object)

使用由 GetEditStyle(ITypeDescriptorContext).. 指示的编辑器样式编辑指定对象的值。

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)

适用于

另请参阅