TaskbarManager 类

定义

提供将应用程序固定到任务栏的方法。

public ref class TaskbarManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TaskbarManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TaskbarManager
Public NotInheritable Class TaskbarManager
继承
Object Platform::Object IInspectable TaskbarManager
属性

Windows 要求

设备系列
Windows 10 Fall Creators Update (在 10.0.16299.0 中引入)
API contract
Windows.Foundation.UniversalApiContract (在 v5.0 中引入)

注解

版本历史记录

Windows 版本 SDK 版本 增值
1809 17763 IsSecondaryTilePinnedAsync
1809 17763 RequestPinSecondaryTileAsync
1809 17763 TryUnpinSecondaryTileAsync

属性

IsPinningAllowed

获取是否允许固定到任务栏。

IsSupported

获取当前设备上是否存在任务栏。

方法

GetDefault()

返回当前进程中处于活动状态的 TaskbarManager 对象。

IsAppListEntryPinnedAsync(AppListEntry)

检查指定的应用程序是否已固定到任务栏。

IsCurrentAppPinnedAsync()

检查当前活动的应用程序是否已固定到任务栏。

IsSecondaryTilePinnedAsync(String)

检查指定的辅助磁贴是否已固定到任务栏。 需要用户批准,如此所述

RequestPinAppListEntryAsync(AppListEntry)

请求将指定的应用程序固定到任务栏。

RequestPinCurrentAppAsync()

请求将当前活动的应用程序固定到任务栏。

RequestPinSecondaryTileAsync(SecondaryTile)

请求将指定的磁贴固定到任务栏。 需要用户批准,如此 所述。

重要

TaskbarManager.RequestPinSecondaryTileAsync API 是受限访问功能的一部分 (请参阅 LimitedAccessFeatures 类) 。 有关详细信息或请求解锁令牌,请联系 Microsoft 支持部门

TryUnpinSecondaryTileAsync(String)

尝试从任务栏取消固定辅助磁贴。 需要用户批准,如此所述

适用于

另请参阅