o..o
o..o

Reputation: 1921

Windows Universal Apps and tray

I was going to write a Windows Universal App that would be running in the tray. On the tray icon there would be a context menu with several options (for adding a new timelog, for closing the current one). But according to this post System tray/taskbar icon/notify icon with universal apps there is no possibility to run the WUP in the tray. Really??

Is the tray meant to be only for the system applications and the old-kind apps?

Is there some other option? To have menu items for pinned taskbar icon, may be?

Thanks

Upvotes: 0

Views: 2318

Answers (2)

Rob Caplan - MSFT
Rob Caplan - MSFT

Reputation: 21919

Universal apps cannot add themselves to the notification area, but the recent Windows 10 Update enables them to add items to the JumpList displayed when right clicking on the item's taskbar icon or tile.

bool jumpListPresent = Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.StartScreen.JumpList");
if (jumpListPresent && JumpList.IsSupported()) 
{
    JumpList jl = await JumpList.LoadCurrentAsync();
    jl.Items.Clear();
    JumpListItem jli = JumpListItem.CreateWithArguments("myJumpListItem", "my Jump List Item");
    jl.Items.Add(jli);
    await jl.SaveAsync();
}

Upvotes: 3

Thomas LEBRUN
Thomas LEBRUN

Reputation: 436

As far as I know, it's not possible to have a tray icon for UWP application. Previously, Windows Apps was designed to run in full screen mode.

If this is a LOB app, you can try to use a Brokered Component to access to the Tray Icon feature.

Thanks,

Upvotes: 2

Related Questions