ToolBoxTab2.UniqueID Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft eine eindeutige ID für die angegebene Registerkarte ab oder legt diese fest.
public:
property System::String ^ UniqueID { System::String ^ get(); void set(System::String ^ value); };
public:
property Platform::String ^ UniqueID { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(9)]
public string UniqueID { [System.Runtime.InteropServices.DispId(9)] get; [System.Runtime.InteropServices.DispId(9)] set; }
[<System.Runtime.InteropServices.DispId(9)>]
[<get: System.Runtime.InteropServices.DispId(9)>]
[<set: System.Runtime.InteropServices.DispId(9)>]
member this.UniqueID : string with get, set
Public Property UniqueID As String
Eigenschaftswert
Eine eindeutige ID.
- Attribute
Beispiele
In diesem Beispiel wird das erste Element ausgewählt und aktiviert ToolBoxTab2 und der Name und der eindeutige Name in einem Meldungs Feld angezeigt.
Imports EnvDTE
Imports EnvDTE80
Sub ToolBoxTabUniqueIDExample(ByVal dte As DTE2)
Dim tlBox As ToolBox
Dim tbxTabs As ToolBoxTabs
Dim tbxTab As ToolBoxTab2
Try
' Create an object reference to the IDE's ToolBox object and
' its tabs.
tlBox = CType(_applicationObject.Windows.Item _
(Constants.vsWindowKindToolbox).Object, ToolBox)
tbxTabs = tlBox.ToolBoxTabs
' Select the first Toolbox tab.
tbxTab = CType(tbxTabs.Item(1), ToolBoxTab2)
MsgBox(tbxTab.Name)
tbxTab.Activate()
MsgBox("The unique ID of the Toolbox tab: " _
& tbxTab.Name & " is " & tbxTab.UniqueID)
Catch ex As System.Exception
MsgBox("ERROR: " & ex.Message)
End Try
End Sub
using EnvDTE;
using EnvDTE80;
using System.Windows.Forms;
public void ToolBoxTabUniqueIDExample(DTE2 dte)
{
ToolBox tlBox;
ToolBoxTabs tbxTabs;
ToolBoxTab2 tbxTab;
try
{
// Create an object reference to the IDE's ToolBox object and
// its tabs.
tlBox = (ToolBox)_applicationObject.Windows.Item
(Constants.vsWindowKindToolbox).Object;
tbxTabs = tlBox.ToolBoxTabs;
// Select the first Toolbox tab.
tbxTab = (ToolBoxTab2)tbxTabs.Item(1);
MessageBox.Show("The name of the selected Toolbox tab is: "
+ tbxTab.Name);
tbxTab.Activate();
MessageBox.Show("The unique ID of the Toolbox tab: "
+ tbxTab.Name + " is " + tbxTab.UniqueID);
}
catch (Exception ex)
{
MessageBox.Show("ERROR: " + ex.Message);
}
}