Share via


NotesWindowManagerPreview Class

Definition

This class owns much of the functionality of the Preview Notes application feature (see Remarks).

public ref class NotesWindowManagerPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.ApplicationModel.Preview.Notes.PreviewNotesContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class NotesWindowManagerPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.ApplicationModel.Preview.Notes.PreviewNotesContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class NotesWindowManagerPreview
Public NotInheritable Class NotesWindowManagerPreview
Inheritance
Object Platform::Object IInspectable NotesWindowManagerPreview
Attributes

Windows requirements

Device family
Windows Desktop Extension SDK (introduced in 10.0.14393.0)
API contract
Windows.ApplicationModel.Preview.Notes.PreviewNotesContract (introduced in v1.0)

Remarks

The Preview Notes feature allows a Universal Windows app to utilize the Windows Ink Workspace in order to provide a tailored note-taking experience on desktop devices. Apps that are recognized as such will operate with a number of behavioral changes meant to make the note-taking process faster and more convenient. For example, note-taking apps will open without a splash screen, will appear in the "Sticky Notes" section of the Windows Ink Workspace, will have their own configurable view-switching mechanism, and can display notes on a locked screen.

Version history

Windows version SDK version Value added
1703 15063 SetFocusToPreviousView
1703 15063 SetThumbnailImageForTaskSwitcherAsync
1703 15063 ShowNoteRelativeTo(Int32,Int32,NotesWindowManagerPreviewShowNoteOptions)
1703 15063 ShowNoteWithPlacement(Int32,IBuffer,NotesWindowManagerPreviewShowNoteOptions)

Properties

IsScreenLocked

Gets a value indicating whether the device's screen is currently locked.

Methods

GetForCurrentApp()

Returns an instance of NotesWindowManagerPreview, to be used for the majority of Preview Notes operations that an app may execute.

GetNotePlacement(Int32)

Gets the view placement of a given note, to be stored in program memory or on disk storage and then restored by the application at a later time.

HideNote(Int32)

Sets a note's view to invisible and moves the focus to the next visible note view (window) or to the Windows Ink Workspace (see Remarks). The views are selected in a cyclic, system-determined order.

Note

Even though the note disappears from the screen, its CoreWindow object remains until the NoteVisibilityChanged event is raised and the handling method closes the note's window by calling the Close method.

SetFocusToNextView()

Switches focus to the next visible note view (window) or to the Windows Ink Workspace (see Remarks). The views are selected in a cyclic, system-determined order.

SetFocusToPreviousView()

Switches focus to the previous visible note view (window) or to the Windows Ink Workspace (see Remarks). The views are selected in a cyclic, system-determined order.

SetNotesThumbnailAsync(IBuffer)

Sets the thumbnail image for this application as it appears in the Windows Ink Workspace, in the Alt+TAB task switcher, or on hovering in the taskbar.

SetThumbnailImageForTaskSwitcherAsync(SoftwareBitmap)

Asynchronously sets the thumbnail image for this application as it appears in the Alt+TAB task switcher.

ShowNote(Int32)

Makes a note visible on the device screen.

Note

This method should only be called on a note that has been hidden with HideNote.

ShowNoteRelativeTo(Int32, Int32)

Makes a note visible and places it adjacent to a specified "anchor" view.

ShowNoteRelativeTo(Int32, Int32, NotesWindowManagerPreviewShowNoteOptions)

Makes a note visible and places it adjacent to a specified "anchor" view.

ShowNoteWithPlacement(Int32, IBuffer)

Makes a note visible and sets its placement data (dimensions and location) as specified.

ShowNoteWithPlacement(Int32, IBuffer, NotesWindowManagerPreviewShowNoteOptions)

Makes a note visible and sets its placement data (dimensions and location) as specified.

TrySetNoteSize(Int32, Size)

Resizes the specified note to the desired dimensions. If the given size is not recommended due to screen size/space issues, the note's size will not be changed.

Events

NotePlacementChanged

Indicates that a note's placement (dimensions and location) has changed.

Note

When this event is raised, the application should call GetNotePlacement to update its record with the note's new placement.

NoteVisibilityChanged

Indicates that a note's visibility state has changed.

Note

When this event is raised, its handler must determine whether the given view was hidden or shown (according to the isVisible property in NoteVisibilityChangedPreviewEventArgs class). If hidden, the note's CoreWindow object must be closed (with the Close method) within the event handler.

SystemLockStateChanged

Indicates that the device's screen lock state has changed.

Applies to