DesignerActionList.AutoShow Özellik

Tanım

Akıllı etiket panelinin oluşturulduğunda otomatik olarak görüntülenip görüntülenmeyeceğini belirten bir değer alır veya ayarlar.

C#
public virtual bool AutoShow { get; set; }

Özellik Değeri

true sahip olan bileşen oluşturulduğunda panelin gösterilmesi gerekiyorsa; aksi takdirde , false. Varsayılan değer: false.

Örnekler

Aşağıdaki kod örneği, nesne koleksiyonunun DesignerActionItem nasıl oluşturulacağını gösterir.

Bu kod örneğinin tam açıklaması için bkz . Nasıl yapılır: Windows Forms Bileşenine Akıllı Etiketler Ekleme.

C#
public override DesignerActionItemCollection GetSortedActionItems()
{
    DesignerActionItemCollection items = new DesignerActionItemCollection();

    //Define static section header entries.
    items.Add(new DesignerActionHeaderItem("Appearance"));
    items.Add(new DesignerActionHeaderItem("Information"));

    //Boolean property for locking color selections.
    items.Add(new DesignerActionPropertyItem("LockColors",
                     "Lock Colors", "Appearance",
                     "Locks the color properties."));
    if (!LockColors)
    {
        items.Add(new DesignerActionPropertyItem("BackColor",
                         "Back Color", "Appearance",
                         "Selects the background color."));
        items.Add(new DesignerActionPropertyItem("ForeColor",
                         "Fore Color", "Appearance",
                         "Selects the foreground color."));

        //This next method item is also added to the context menu 
        // (as a designer verb).
        items.Add(new DesignerActionMethodItem(this,
                         "InvertColors", "Invert Colors",
                         "Appearance",
                         "Inverts the fore and background colors.",
                          true));
    }
    items.Add(new DesignerActionPropertyItem("Text",
                     "Text String", "Appearance",
                     "Sets the display text."));

    //Create entries for static Information section.
    StringBuilder location = new StringBuilder("Location: ");
    location.Append(colLabel.Location);
    StringBuilder size = new StringBuilder("Size: ");
    size.Append(colLabel.Size);
    items.Add(new DesignerActionTextItem(location.ToString(),
                     "Information"));
    items.Add(new DesignerActionTextItem(size.ToString(),
                     "Information"));

    return items;
}

Açıklamalar

Özellik değeri olarak trueayarlanırsa, bu DesignerActionList değerin ilişkilendirildiği bileşen otomatik olarak genişletilir ve bileşen oluşturulduğunda akıllı etiket panelini görüntüler.

özelliğini falseolarak ayarlayarak DesignerOptions.ObjectBoundSmartTagAutoShow bu davranışı geri çevirebilirsiniz.

Şunlara uygulanır

Ürün Sürümler
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

Ayrıca bkz.