Pin to windows taskbar

Pin your app to the taskbar

You can programmatically pin your own app to the taskbar, just like you can pin your app to the Start menu. And you can check whether your app is currently pinned, and whether the taskbar allows pinning.

Requires Fall Creators Update: You must target SDK 16299 and be running build 16299 or higher to use the taskbar APIs.

When should you ask the user to pin your app to the taskbar?

The TaskbarManager class lets you ask the user to pin your app to the taskbar; the user must approve the request. You put a lot of effort into building a stellar app, and now you have the opportunity to ask the user to pin it to taskbar. But before we dive into the code, here are some things to keep in mind as you are designing your experience:

  • Do craft a non-disruptive and easily dismissible UX in your app with a clear «Pin to taskbar» call to action. Avoid using dialogs and flyouts for this purpose.
  • Do clearly explain the value of your app before asking the user to pin it.
  • Don’t ask a user to pin your app if the tile is already pinned or the device doesn’t support it. (This article explains how to determine whether pinning is supported.)
  • Don’t repeatedly ask the user to pin your app (they will probably get annoyed).
  • Don’t call the pin API without explicit user interaction or when your app is minimized/not open.

1. Check whether the required APIs exist

If your app supports older versions of Windows 10, you need to check whether the TaskbarManager class is available. You can use the ApiInformation.IsTypePresent method to perform this check. If the TaskbarManager class isn’t available, avoid executing any calls to the APIs.

2. Check whether taskbar is present and allows pinning

Windows apps can run on a wide variety of devices; not all of them support the taskbar. Right now, only Desktop devices support the taskbar.

Even if the taskbar is available, a group policy on the user’s machine might disable taskbar pinning. So, before you attempt to pin your app, you need to check whether pinning to the taskbar is supported. The TaskbarManager.IsPinningAllowed property returns true if the taskbar is present and allows pinning.

If you don’t want to pin your app to the taskbar and just want to find out whether the taskbar is available, use the TaskbarManager.IsSupported property.

Читайте также:  Секретные обои mac os

3. Check whether your app is currently pinned to the taskbar

Obviously, there’s no point in asking the user to let you pin the app to the taskbar if it’s already pinned there. You can use the TaskbarManager.IsCurrentAppPinnedAsync method to check whether the app is already pinned before asking the user.

4. Pin your app

If the taskbar is present and pinning is allowed and your app currently isn’t pinned, you might want to show a subtle tip to let users know that they can pin your app. For example, you might show a pin icon somewhere in your UI that the user can click.

If the user clicks your pin suggestion UI, you would then call the TaskbarManager.RequestPinCurrentAppAsync method. This method displays a dialog that asks the user to confirm that they want your app pinned to the taskbar.

This must be called from a foreground UI thread, otherwise an exception will be thrown.

This method returns a boolean value that indicates whether your app is now pinned to the taskbar. If your app was already pinned, the method immediately returns true without showing the dialog to the user. If the user clicks «no» on the dialog, or pinning your app to the taskbar isn’t allowed, the method returns false. Otherwise, the user clicked yes and the app was pinned, and the API will return true.

How to Pin a Program or Website to the Windows Taskbar

Keep your favorites close by

The Windows Taskbar is a handy place to have shortcuts because it’s always visible when you use Windows. You can also pin favorite websites and even files (though pinning files takes a bit more effort). Here we describe how to do each one.

This article applies to Windows 10.

Pin a Program to the Taskbar

Do you use Chrome every time you turn on your computer? What about Skype or Excel? You can pin whichever programs you use most frequently so you can easily start them any time. There are two ways to do the pinning, from the open program or from a desktop shortcut.

The first method is to pin from a program that’s running. First, launch the program as you normally would.

At the bottom of your screen, the program icon appears on the taskbar. Right-click it and, from the menu, select Pin to taskbar.

The icon is pinned permanently to the taskbar.

To change the order of the icons, select and drag them where you like.

Alternatively, drag a program shortcut on your desktop to the taskbar. The shortcut is pinned permanently to the taskbar.

Pin a File to the Taskbar

Just as there are certain programs you want easy access to, there may be certain files that you open frequently and want to have handy at all times. Here’s how to pin a file to the taskbar.

When you pin a file to the taskbar, you’re actually pinning it to the program it’s associated with, so it will not appear as an icon on its own.

Open File Explorer and navigate to the file you want to pin. Select and drag the file to the taskbar.

The icon shows a notice: «Pin to X,» with X being the application the file is associated with.

To access the file from the taskbar, right-click the icon of the associated application and, from the menu, choose the name of the file.

Читайте также:  Как подключить жесткий диск для установки windows

Pin a Website to Taskbar Using Google Chrome

You can also access a website directly from the Windows taskbar. Doing so will open Chrome and then the website, but you’ll just have to execute a single click.

Open Chrome and navigate to the website you want to pin.

In the upper-right corner, select the Customize (three vertical dots) icon.

Choose More tools > Create shortcut.

In the Create Shortcut dialog box, type a name for the shortcut. Select Create.

Go to your desktop, where you will find the newly created shortcut. Drag the shortcut to the taskbar.

The shortcut is pinned permanently to the taskbar.

How to pin any folder to the Windows taskbar, in 3 steps

In Windows, it is easy to pin your apps and programs to the taskbar. However, it is not easy to pin folders and add shortcuts on the taskbar, for the folders you use most often. Most users will never figure out on their own how to do this. Luckily, we have a solution for you, that works in Windows 10, Windows 7 and Windows 8.1. Read on to see how it is done:

Step 1: Create a shortcut on the desktop, to the folder that you want to pin to the taskbar

First, decide on the folder that you want to pin to the taskbar. You need to create a special shortcut to it, on your desktop. Therefore, go to the desktop and right-click or press and hold (if you have a touchscreen), somewhere on the empty space. In the contextual menu that opens, choose New and then Shortcut.

The “Create Shortcut” wizard opens. Click or tap the Browse button and navigate to the folder that you want to pin to the taskbar. After you select it, press OK.

NOTE: If you need more help in working with the “Create Shortcut” wizard, read this tutorial: How to create shortcuts for apps, files, folders and web pages in Windows

The wizard places the whole path to the selected folder in the location field. DO NOT click or tap Next. Before you do that, you need to type the word explorer, followed by a space, just before the folder’s path. Do no type “C:explorer” or something else and do not forget the space, otherwise the procedure does not work. Look at the screenshot below and make sure that you have used the same approach. Only then press the Next button.

You are asked to enter the name for this shortcut. It is best that you change the default name to a personalized one, so that you know what folder is opened when you use the shortcut. After you type the name, press Finish.

The shortcut is now created on your desktop and its icon is the same as for File Explorer or Windows Explorer, depending on the version of Windows that you are using.

To verify that it works and it takes you to the folder that you want to pin to the taskbar, double-click on the shortcut.

Step 2: Change the icon of the shortcut that you have created

The next logical step is to pin this shortcut from the desktop to the taskbar. If you do this right away, you end-up having the File Explorer or Windows Explorer shortcut on the taskbar and an identical looking shortcut next to it. You will not know which is for File Explorer and which is for the folder that you have pinned.

Читайте также:  Chrome browser windows downloads

It is best that you personalize the icon for the folder shortcut to something unique, that makes it easy to identify it. See below how we replaced our shortcut’s icon for our Digital Citizen folder, with our website’s icon.

If you want to change the icon of the shortcut, follow this detailed guide: How To Change the Icon of Any Shortcut in Windows .

We can also give you the short version here: right-click on the shortcut (or press and hold, if you have a touchscreen), and choose Properties. In the shortcut’s properties, go to the Shortcut tab and press Change Icon. Then, select the file containing the icon that you want to use, choose the icon and click/tap OK in the Change Icon window and then in the shortcut’s properties.

The icon is now changed for your shortcut to the folder that you want to pin to the taskbar.

If you want some free icons that you can use, we recommend these articles:

Step 3: Pin the shortcut to the taskbar

Now it is time to pin the shortcut that you have created, to the Windows taskbar. Right-click on the shortcut (or press and hold, if you have a touchscreen), and choose “Pin to taskbar.”

The shortcut is now pinned to the taskbar and so is the folder it points to.

Can I pin as many folders as I want?

With this method, you can pin as many folders as you want. We recommend that you change the icon for each shortcut, so that you can tell your folders apart.

Can I remove the shortcut from the desktop?

After you pin the shortcut to a folder, on the Windows taskbar, you can delete the shortcut from the desktop, that you created at step 1 from this tutorial. The pinned folder will still work. However, as soon as you delete the folder that you have pinned, its taskbar shortcut will open File Explorer (in Windows 10 and Windows 8.1) or Windows Explorer (in Windows 7).

How does the pin to File Explorer option work?

Some people have commented that our guide is useless and that you can pin folders to the taskbar with a simple drag and drop. They say that you have to do the following: open File Explorer or Windows Explorer, and drag the folder that you want pinned to the taskbar. When you do that, you see an option that says “Pin to File Explorer” or “Pin to Windows Explorer.” When you see that text, release the left-click mouse button.

This approach works but it doesn’t pin a folder to the taskbar, using its own separate shortcut. It pins the folder to the right-click menu for the File Explorer/Windows Explorer shortcut on the taskbar. Right click on it, and you see the folder listed as pinned, alongside other folders that you may have pinned.

As you can see, the end-result is very different from what you get with our tutorial.

How many folders did you pin to your taskbar?

Now you know how to pin any folder that you want to use, on the Windows taskbar. We are curios if things worked well for you and how many folders you have pinned. Don’t hesitate to comment below and discuss with us and other readers.

Оцените статью