Command.LocalizedName 属性

定义

获取命令的本地化名称。

public:
 property System::String ^ LocalizedName { System::String ^ get(); };
public:
 property Platform::String ^ LocalizedName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(1)]
public string LocalizedName { [System.Runtime.InteropServices.DispId(1)] get; }
[<System.Runtime.InteropServices.DispId(1)>]
[<get: System.Runtime.InteropServices.DispId(1)>]
member this.LocalizedName : string
Public ReadOnly Property LocalizedName As String

属性值

String

表示命令的本地化名称的字符串。

属性

示例

Sub LocalizedNameExample()  
   ' Before running, you must add a reference to  
   ' Microsoft.VisualStudio.CommandBars.  
   Dim cmds As Commands  
   Dim cmdobj As Command  
   Dim customin, customout As Object  
   Dim colAddins As AddIns  

   ' Set references.  
   colAddins = DTE.AddIns()  
   cmds = DTE.Commands  
   cmdobj = cmds.Item("File.NewFile")  

   ' List some of the command properties.  
   MsgBox("Command Name: " & cmdobj.Name)  
   MsgBox("Is Command Available?: " & cmdobj.IsAvailable)  
   MsgBox("Localized name: " & cmdobj.LocalizedName)  
   MsgBox("Command ID: " & cmdobj.ID)  
   MsgBox("Command GUID: " & cmdobj.Guid)  
End Sub  

适用于