共用方式為


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))

適用於

另請參閱