PinnedContactManager PinnedContactManager PinnedContactManager PinnedContactManager Class

Definition

Represents a service that source apps can call to pin and unpin contacts to and from the taskbar or Start menu.

public : sealed class PinnedContactManager : IPinnedContactManagerpublic sealed class PinnedContactManager : IPinnedContactManagerPublic NotInheritable Class PinnedContactManager Implements IPinnedContactManager// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Properties

User User User User

Gets the User associated with the PinnedContactManager.

public : User User { get; }public User User { get; }Public ReadOnly Property User As User// You can use this property in JavaScript.
Value
User User User User

The User associated with the PinnedContactManager.

Methods

GetDefault() GetDefault() GetDefault() GetDefault()

Gets the default an instance of a PinnedContactManager.

public : static PinnedContactManager GetDefault()public static PinnedContactManager GetDefault()Public Static Function GetDefault() As PinnedContactManager// You can use this method in JavaScript.
Returns

Remarks

This method must be called from the main UI thread.

GetForUser(User) GetForUser(User) GetForUser(User) GetForUser(User)

Gets a PinnedContactManager for the specified user.

public : static PinnedContactManager GetForUser(User user)public static PinnedContactManager GetForUser(User user)Public Static Function GetForUser(user As User) As PinnedContactManager// You can use this method in JavaScript.
Parameters
user
User User User User

The user account to use to get the PinnedContactManager.

Returns

Returns the PinnedContactManager for the account specified by the user parameter.

Remarks

This method must be called from the main UI thread.

GetPinnedContactIdsAsync() GetPinnedContactIdsAsync() GetPinnedContactIdsAsync() GetPinnedContactIdsAsync()

Gets the ID's of all contacts that are pinned to the taskbar or Start menu.

public : IAsyncOperation<PinnedContactIdsQueryResult> GetPinnedContactIdsAsync()public IAsyncOperation<PinnedContactIdsQueryResult> GetPinnedContactIdsAsync()Public Function GetPinnedContactIdsAsync() As IAsyncOperation( Of PinnedContactIdsQueryResult )// You can use this method in JavaScript.
Returns

Remarks

This method raises an AccessDeniedException if you have not enabled the contactPanel capability in your app manifest.

This method can be called from a background thread.

IsContactPinned(Contact, PinnedContactSurface) IsContactPinned(Contact, PinnedContactSurface) IsContactPinned(Contact, PinnedContactSurface) IsContactPinned(Contact, PinnedContactSurface)

Indicates whether the specified contact is pinned to the specified location in the Windows user interface.

public : PlatForm::Boolean IsContactPinned(Contact contact, PinnedContactSurface surface)public bool IsContactPinned(Contact contact, PinnedContactSurface surface)Public Function IsContactPinned(contact As Contact, surface As PinnedContactSurface) As bool// You can use this method in JavaScript.
Parameters
contact
Contact Contact Contact Contact

A contact of interest. This property indicates whether that contact is pinned or not pinned.

surface
PinnedContactSurface PinnedContactSurface PinnedContactSurface PinnedContactSurface

A pinnedContactSurface value that specifies the location in the UI that you'd like to check for pinned contacts.

Returns
PlatForm::Boolean bool bool bool

A Boolean value that specifies whether the specified contact is pinned to the specified location in the Windows user interface.

IsPinSurfaceSupported(PinnedContactSurface) IsPinSurfaceSupported(PinnedContactSurface) IsPinSurfaceSupported(PinnedContactSurface) IsPinSurfaceSupported(PinnedContactSurface)

Indicates whether the specified location in the Windows UI supports contact pinning.

public : PlatForm::Boolean IsPinSurfaceSupported(PinnedContactSurface surface)public bool IsPinSurfaceSupported(PinnedContactSurface surface)Public Function IsPinSurfaceSupported(surface As PinnedContactSurface) As bool// You can use this method in JavaScript.
Parameters
surface
PinnedContactSurface PinnedContactSurface PinnedContactSurface PinnedContactSurface

A pinnedContactSurface value that specifies a pinning location in the Windows UI. This property determines whether pinning is supported in that location.

Returns
PlatForm::Boolean bool bool bool

A Boolean value that indicates whether the location in the Windows UI supports contact pinning.

Remarks

This property can be useful if your app handles the Window.SizeChanged event. That event is raised when the view changes between monitors. In the WindowSizeChanged event handler, your could use this property to determine whether the new monitor supports pinning.

IsSupported() IsSupported() IsSupported() IsSupported()

Indicates whether the Windows UI supports contact pinning.

public : static PlatForm::Boolean IsSupported()public static bool IsSupported()Public Static Function IsSupported() As bool// You can use this method in JavaScript.
Returns
PlatForm::Boolean bool bool bool

A Boolean value that indicates whether the Windows UI supports contact pinning.

RequestPinContactAsync(Contact, PinnedContactSurface) RequestPinContactAsync(Contact, PinnedContactSurface) RequestPinContactAsync(Contact, PinnedContactSurface) RequestPinContactAsync(Contact, PinnedContactSurface)

Pins a contact to the taskbar or Start menu.

public : IAsyncOperation<PlatForm::Boolean> RequestPinContactAsync(Contact contact, PinnedContactSurface surface)public IAsyncOperation<bool> RequestPinContactAsync(Contact contact, PinnedContactSurface surface)Public Function RequestPinContactAsync(contact As Contact, surface As PinnedContactSurface) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
contact
Contact Contact Contact Contact

The contact to pin to the taskbar or Start menu.

surface
PinnedContactSurface PinnedContactSurface PinnedContactSurface PinnedContactSurface

A pinnedContactSurface value that specifies where in the Windows UI you would like to pin the contact.

Returns

An asynchronous operation that returns a Boolean value that indicates whether the contact was successfully pinned to the specified location.

Remarks

This method must be called from the main UI thread.

RequestPinContactsAsync(IIterable, PinnedContactSurface) RequestPinContactsAsync(IIterable, PinnedContactSurface) RequestPinContactsAsync(IIterable, PinnedContactSurface) RequestPinContactsAsync(IIterable, PinnedContactSurface)

Pins a collection of contacts to the taskbar or Start menu.

public : IAsyncOperation<PlatForm::Boolean> RequestPinContactsAsync(IIterable<Contact> contacts, PinnedContactSurface surface)public IAsyncOperation<bool> RequestPinContactsAsync(IEnumerable<Contact> contacts, PinnedContactSurface surface)Public Function RequestPinContactsAsync(contacts As IEnumerable<Contact>, surface As PinnedContactSurface) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
contacts
IIterable<Contact> IEnumerable<Contact> IEnumerable<Contact> IEnumerable<Contact>

The collection of contacts to pin to the taskbar or Start menu.

surface
PinnedContactSurface PinnedContactSurface PinnedContactSurface PinnedContactSurface

A pinnedContactSurface value that specifies where in the Windows UI you would like to pin the contacts.

Returns

An asynchronous operation that returns a Boolean value that indicates whether the contacts were successfully pinned to the specified location.

Remarks

This method must be called from the main UI thread.

RequestUnpinContactAsync(Contact, PinnedContactSurface) RequestUnpinContactAsync(Contact, PinnedContactSurface) RequestUnpinContactAsync(Contact, PinnedContactSurface) RequestUnpinContactAsync(Contact, PinnedContactSurface)

Unpins a contact from the taskbar or Start menu.

public : IAsyncOperation<PlatForm::Boolean> RequestUnpinContactAsync(Contact contact, PinnedContactSurface surface)public IAsyncOperation<bool> RequestUnpinContactAsync(Contact contact, PinnedContactSurface surface)Public Function RequestUnpinContactAsync(contact As Contact, surface As PinnedContactSurface) As IAsyncOperation( Of bool )// You can use this method in JavaScript.
Parameters
contact
Contact Contact Contact Contact

The contact to unpin from the taskbar or Start menu.

surface
PinnedContactSurface PinnedContactSurface PinnedContactSurface PinnedContactSurface

A pinnedContactSurface value that specifies from which area in the Windows UI you would like to unpin the contact.

Returns

An asynchronous operation that returns a Boolean value that indicates whether the contact was successfully unpinned from the specified location.

Remarks

This method must be called from the main UI thread.

SignalContactActivity(Contact) SignalContactActivity(Contact) SignalContactActivity(Contact) SignalContactActivity(Contact)

Indicates to Windows when activity that is related to a pinned contact occurs.

public : void SignalContactActivity(Contact contact)public void SignalContactActivity(Contact contact)Public Function SignalContactActivity(contact As Contact) As void// You can use this method in JavaScript.
Parameters
contact
Contact Contact Contact Contact

The contact that is exhibits activity.

Remarks

Activity could be any interesting event related to a contact that occurs in your app. For example, if your app receives a message or mail for a contact, your app could call the SignalContactActivity to report that event. Windows indicates this reported activity to the user. Windows does not indicate anything to the user if the contact is not pinned. If you call this method for a contact that is not pinned, no error will occur.

Your app can call this method from a background thread.