JumpListItem 클래스

정의

앱의 점프 목록에 대한 점프 목록 항목을 만들고 정의하는 기능을 제공합니다.

public ref class JumpListItem sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 131072)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class JumpListItem final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 131072)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class JumpListItem
Public NotInheritable Class JumpListItem
상속
Object Platform::Object IInspectable JumpListItem
특성

Windows 요구 사항

디바이스 패밀리
Windows 10 (10.0.10586.0에서 도입되었습니다.)
API contract
Windows.Foundation.UniversalApiContract (v2.0에서 도입되었습니다.)

예제

다음 예제에서는 명령줄 매개 변수를 사용하여 앱을 시작하고 원하는 작업을 수행하는 JumpList 에 대한 작업을 만드는 방법을 보여 줍니다. 지역화는 표시되지 않지만 ms-resource:ms-appx: URI 체계를 사용하여 DisplayName, 설명로고에 사용할 수 있습니다.

private Windows.UI.StartScreen.JumpListItem CreateJumpListItemTask()
{
    var taskItem = JumpListItem.CreateWithArguments(
                            "/Argument", "DisplayName");

    // Set the description. (Optional.)
    taskItem.Description = "Compose a new message to " + friendName;

    // Set the logo for this jump list item. Must be ms-appx: or ms-appdata:.
    taskItem.Logo = new Uri("ms-appdata:///local/downloads/taskImage.png");

    // If the GroupName is left blank, then the item goes into the Tasks group by default.

    return taskItem;
}

partial class App
{
    protected override void OnLaunched(LaunchActivatedEventArgs e)
    {
        if (e.Kind == ActivationKind.Launch && e.Arguments == "/Argument")
        {
            // Run code relevant to the task that was selected.
        }
    }
}

설명

JumpListItem은 CreateWithArgumentsCreateSeparator 메서드를 사용하여 만들어집니다. 만든 후에는 점프 목록의 Items 속성과 SaveAsync 메서드를 사용하여 앱의 점프 목록에 추가할 수 있습니다. 사용자 인터페이스에서 사용자는 사용자 지정 그룹에 있는 점프 목록 항목을 마우스 오른쪽 단추로 클릭하고 "이 목록에서 제거"를 선택할 수 있습니다. 이 작업이 발생하면 시스템은 사용자가 항목을 제거한 것으로 표시하고 UI에서 제거합니다. 다음에 앱이 점프 목록을 로드할 때 항목의 RemovedByUser 속성이 True로 설정되어 있는지 확인하기 위해 항목을 검사 합니다. RemovedByUser가 True이면 앱이 사용자가 시작한 변경 내용과 동기화되도록 내부 상태를 업데이트해야 합니다. 예를 들어 연결된 문서를 다시 여는 사용자와 같이 추가 조건이 다시 충족될 때까지 제거된 항목이 점프 목록에 다시 추가되지 않도록 하는 것은 앱의 책임입니다.

앱이 SaveAsync를 사용하여 JumpList를 저장하면 운영 체제는 다음과 같이 항목을 구성합니다.

  • RemovedByUser가 True인 모든 항목이 제거됩니다.
  • GroupName 속성이 동일한 항목이 함께 배치되어 상대 순서가 유지됩니다.
  • 그룹 순서는 그룹 내 첫 번째 항목의 원래 위치에 따라 정렬됩니다. 단, 시스템 관리 그룹이 항상 맨 위에 있고 작업 그룹이 있는 경우 항상 맨 아래에 있습니다. 즉, 앱이 LoadCurrentAsync 메서드를 사용하여 JumpList를 로드하면 항목이 구성된 순서로 검색되며, 이는 원래 저장되었을 때 점프 목록에 있는 항목의 순서에 동의하지 않을 수 있습니다.

속성

Arguments

점프 목록 항목에 대한 명령줄 인수를 가져옵니다.

Description

점프 목록 항목 작업 설명을 가져오거나 설정합니다.

DisplayName

점프 목록 항목 표시 이름을 가져오거나 설정합니다. 점프 목록 항목을 만들 때 CreateWithArguments 메서드를 사용하여 표시 이름을 매개 변수로 지정할 수도 있습니다.

GroupName

점프 목록 항목 사용자 지정 그룹 이름을 가져오거나 설정합니다. 이름을 지정하지 않으면 항목이 기본적으로 작업 그룹에 추가됩니다.

Kind

점프 목록 항목의 JumpListItemKind 를 가져옵니다.

Logo

점프 목록 항목의 로고를 가져오거나 설정합니다.

RemovedByUser

사용자가 앱의 점프 목록에서 점프 목록 항목을 제거했는지 여부를 나타내는 부울을 가져옵니다.

메서드

CreateSeparator()

앱의 점프 목록 내에서 사용자 지정 그룹에 대한 불활성 구분 기호인 점프 목록 항목을 만듭니다.

CreateWithArguments(String, String)

앱의 점프 목록에 대한 새 점프 목록 항목을 만듭니다.

적용 대상

추가 정보