ISuggestedAction.HasPreview Property


Gets whether this suggested action can provide a preview via GetPreviewAsync(CancellationToken) method call.

 property bool HasPreview { bool get(); };
 property bool HasPreview { bool get(); };
public bool HasPreview { get; }
member this.HasPreview : bool
Public ReadOnly Property HasPreview As Boolean

Property Value


Returns Boolean.


This property is expected to be fast so if calculating the return value is not trivial it's recommended to just return true and delay evaluating whether a preview can be provided until GetPreviewAsync(CancellationToken) method is called. In other words, the scenario of HasPreview returning true and GetPreviewAsync(CancellationToken) returning null is supported. On the other hand, if this property returns false, GetPreviewAsync(CancellationToken) method will not be called.

Applies to