2

I write Windows 10 Apps in JavaScript and know, there are some limitations. If I look at the documentation for jumplists, Microsoft just writes »For information about creating or accessing this object, see Remarks.« for JavaScript and only gives examples for C#.

So how can I add a jumplist to my UWP Windows 10 App and how can I add and delete Listitems?

stefan.s
  • 3,449
  • 2
  • 28
  • 44
kaiserkiwi
  • 469
  • 4
  • 16

1 Answers1

2

It's very similar to the c# code.

You can find an example here: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/JumpList/js/js

The essential code is:

var Uri = Windows.Foundation.Uri;
var StartScreen = Windows.UI.StartScreen;
var JumpList = StartScreen.JumpList;
var JumpListItem = StartScreen.JumpListItem;

var item = JumpListItem.createWithArguments("key", "caption");
item.description = "Description";
item.groupName = GroupName.value;
item.logo = new Uri("ms-appx:///images/your-images.png");
jumpList.items.append(item);

jumpList.saveAsync();
stefan.s
  • 3,449
  • 2
  • 28
  • 44