共用方式為


JumpTask.Title 屬性

定義

取得或設定跳轉清單中顯示的任務文字。

public:
 property System::String ^ Title { System::String ^ get(); void set(System::String ^ value); };
public string Title { get; set; }
member this.Title : string with get, set
Public Property Title As String

屬性值

跳轉清單中顯示的任務文字。 預設值為 null

範例

以下範例說明如何宣告 JumpTask a 在加標中。 然後 JumpTask 在記事本應用程式中開啟一個文字檔名 readme.txt

<JumpTask Title="Read Me" 
          Description="Open readme.txt in Notepad." 
          ApplicationPath="C:\Windows\notepad.exe"
          IconResourcePath="C:\Windows\System32\imageres.dll"
          IconResourceIndex="14"
          WorkingDirectory="C:\Users\Public\Documents"
          Arguments="readme.txt"/>

以下範例說明如何配置 in JumpTask code 。 這 JumpTask 時會打開計算機應用程式。

// Configure a new JumpTask.
JumpTask jumpTask1 = new JumpTask();
// Get the path to Calculator and set the JumpTask properties.
jumpTask1.ApplicationPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.IconResourcePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.SystemX86), "calc.exe");
jumpTask1.Title = "Calculator";
jumpTask1.Description = "Open Calculator.";
jumpTask1.CustomCategory = "User Added Tasks";

備註

通常,必須設定該 Title 屬性才能 JumpTask 以可點擊任務的形式出現在跳轉清單中。

或者,你也可以透過建立 JumpTask 一個沒有 a TitleCustomCategory 指定的跳清單項目,視覺化地將跳清單中的項目分隔開來。 這個空 JumpTask 位會在跳躍清單中以水平線顯示。 在這種情況下,其他屬性可以被設定,但它們不會產生任何影響。

適用於