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
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();
}
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,
Related
I am working on electron app where i open a child window which i want to be above all the windows (not above fullscreen windows though), I managed to do it by using
win.setAlwaysOnTop(true, "screen-saver");
It now stays on top of all other open apps and keynote app presentation mode, i want user to be able to click buttons inside my window but now the issue is as soon as user clicks on button or just window in my child window, keynote window minimizes (as focus shifts to my window).
What i tried : I tried almost all available window option given in electron docs with different variations, I also tried playing with modals, but obviously modals stay in window itself, i want to keep main app minimized and keep child window on top of other apps. I also found electron-modal package, but that also behaves same.
working example
I was trying different application to check is any other application is able to do it, and i found that zoom app window (in screen share mode) is able to stay on top of keynote app and you can click buttons inside that app, you can move window, and keynote app keeps running in the background with no issues. I am trying to achieve exactly same behaviour.
This is something that you won't be able to recreate with electron currently, except through a native node module that manipulates your window related OS flags.
You can follow this issue on the Electron repository, since the flags introduced there should resolve your issue, or at least give you a point of entry to make your own PR or node_module.
https://github.com/electron/electron/issues/10078
I am developing a desktop widget which shows current system status. But the problem is when any user clicks outside of browser window the app get hide/not visible on the desktop. The same thing happens when user press key windows key +D. Is there anything that we can do for preventing this or catch this event and call window.show(). Because lots of desktop widget support this kind of feature.
Edit: I have tried alwaysOnTop property of browserWindow, but I don't want to show my app above the other apps. Like any desktop widget which always shows on the desktop.
According to this link:
Only users can pin a secondary tile to the Start screen; apps can't programmatically pin secondary tiles
what does it mean? because I can pin my application to start screen by this code:
secondaryTile.RequestCreateAsync();
Seems like that documentation meant to say...
Secondary Tiles should only be pinned as a result of direct user interaction (like clicking a Pin button in your app).
In Windows 8.1, your users will see that dialog displaying a preview of the tile, confirming whether they'd like to pin it. In Windows Phone 8.1, the tile will be automatically pinned and the user will be taken to the Start Screen, showing them the new tile. In Windows 10 Desktop, the user will see a "Did you mean to pin this to Start?" dialog, which they have to click yes in order to pin the tile. In Windows 10 Mobile, the tile will be silently pinned and your app will remain in the foreground.
Here is the link to my extension code:
Trying to capture desktop image using getUserMedia and canvas
The problem is that when I use :
chrome.desktopCapture.chooseDesktopMedia(["screen", "window"],onAccessApproved);
It asks me to share contents of my screen. But it doesn't show all windows that are active on my desktop.
Example: Sometimes my skype is minimised and if click the extension icon it opens a sharing panel and asks me to share desktop contents but skype window is not shown in this panel. If I click on skype from my task bar, the sharing panel shows skype. Reason for this behaviour?
How to show all my windows on sharing screen?
Well, the behavior is consistent: on Windows, minimized windows are not shown as eligible capture targets. There is no way around it.
This limitation is not documented, which is regrettable; it may also be OS-specific.
Specifically, Windows implementation contains the following comment:
// Skip windows that are invisible, minimized, have no title, or are owned,
// unless they have the app window style set.
Interestingly, this seems more like a Mac limitation than a Windows one:
// Return a 1x1 black frame if the window is minimized, to match the behavior
// on Mac.
Is it possible to add items to the application window (as opposed to the context menu) in a Chrome app? (Or, for that matter, alter it in any way?)
No. This menu is not part of the Chrome App execution environment. On some platforms (e.g., Chrome OS) it doesn't even exist. Where you see it, it's because the app wrapper for that particular OS supplies it automatically. Instead, use context menus, buttons and other controls, or, if you like, your own menu bar.