ToolBoxTab3.Expanded Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Obtém ou define se a guia caixa de ferramentas é exibida ou acumulada.
public:
property bool Expanded { bool get(); void set(bool value); };
public:
property bool Expanded { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(10)]
public bool Expanded { [System.Runtime.InteropServices.DispId(10)] get; [System.Runtime.InteropServices.DispId(10)] set; }
[<System.Runtime.InteropServices.DispId(10)>]
[<get: System.Runtime.InteropServices.DispId(10)>]
[<set: System.Runtime.InteropServices.DispId(10)>]
member this.Expanded : bool with get, set
Public Property Expanded As Boolean
Valor da propriedade
Um valor booliano que indica se a guia é expandida.
- Atributos
Exemplos
Este exemplo adiciona um novo item a uma guia da caixa de ferramentas, ativa-o e, em seguida, expande e contrai sua guia.
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Sub ActivateExample(ByVal dte As DTE2)
' Add a new tab to the Toolbox.
Dim box As ToolBox = dte.ToolWindows.ToolBox
Dim tab As ToolBoxTab3 = CType(box.ToolBoxTabs.Add _
("Sample ToolBoxTab"),ToolBoxTab3)
' Add two ToolBoxItem objects to the new Toolbox tab.
Dim item As ToolBoxItem = tab.ToolBoxItems.Add("Text Item", _
"Hello, text item!")
tab.ToolBoxItems.Add("HTML Item", "Hello, HTML item!", _
vsToolBoxItemFormat.vsToolBoxItemFormatHTML)
' Select the "Text Item" ToolBox item.
box.Parent.AutoHides = False
box.Parent.Activate()
tab.Activate()
tab.Expanded = False
MsgBox("Expanded = false")
tab.Expanded = True
MsgBox("Expanded = true")
End Sub
using EnvDTE;
using EnvDTE80;
using EnvDTE90;
using System.Windows.Forms;
public void ActivateExample(DTE2 dte)
{
// Add a new tab to the Toolbox.
ToolBox box = dte.ToolWindows.ToolBox;
ToolBoxTab3 tab = (ToolBoxTab3)box.ToolBoxTabs.Add
("Sample ToolBoxTab");
// Add two ToolBoxItem objects to the new Toolbox tab.
ToolBoxItem item =
tab.ToolBoxItems.Add("Text Item", "Hello, text item!",
vsToolBoxItemFormat.vsToolBoxItemFormatText);
tab.ToolBoxItems.Add("HTML Item", "Hello, HTML item!",
vsToolBoxItemFormat.vsToolBoxItemFormatHTML);
// Select the "Text Item" ToolBox item.
box.Parent.AutoHides = false;
box.Parent.Activate();
tab.Activate();
tab.Expanded = false;
MessageBox.Show("Expanded = false");
tab.Expanded = true;
MessageBox.Show("Expanded = true");
}