Glyph(Behavior) 构造函数

定义

初始化 Glyph 类的新实例。

protected:
 Glyph(System::Windows::Forms::Design::Behavior::Behavior ^ behavior);
protected Glyph (System.Windows.Forms.Design.Behavior.Behavior behavior);
protected Glyph (System.Windows.Forms.Design.Behavior.Behavior? behavior);
new System.Windows.Forms.Design.Behavior.Glyph : System.Windows.Forms.Design.Behavior.Behavior -> System.Windows.Forms.Design.Behavior.Glyph
Protected Sub New (behavior As Behavior)

参数

behavior
Behavior

Behavior 关联的 Glyph。 可以为 null

示例

以下示例演示如何初始化 类的新实例 Glyph 。 此代码示例是为 BehaviorService 类提供的一个更大示例的一部分。

demoAdorner = gcnew Adorner();
BehaviorService->Adorners->Add(demoAdorner);
demoAdorner->Glyphs->Add 
    (gcnew DemoGlyph(BehaviorService, Control));
myAdorner = new Adorner();
BehaviorService.Adorners.Add(myAdorner);
myAdorner.Glyphs.Add(new MyGlyph(BehaviorService, Control));
myAdorner = New Adorner()
BehaviorService.Adorners.Add(myAdorner)
myAdorner.Glyphs.Add(New MyGlyph(BehaviorService, Control))

适用于

另请参阅