AppTaskContent.SetQuestion(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets a question to display to the user when the task needs attention.
public:
virtual void SetQuestion(Platform::String ^ question) = SetQuestion;
/// [Windows.Foundation.Metadata.Experimental]
void SetQuestion(winrt::hstring const& question);
[Windows.Foundation.Metadata.Experimental]
public void SetQuestion(string question);
function setQuestion(question)
Public Sub SetQuestion (question As String)
Parameters
- question
-
String
Platform::String
winrt::hstring
The question text to display to the user.
- Attributes
Remarks
Important
App task support will start gradually rolling out to Windows 11 starting May, 2026. The experiences enabled by Windows.UI.Shell.Tasks APIs require that the corresponding app task feature be present in the version of Windows where the app runs. Otherwise, these APIs will not have any effect.
Use this method in combination with AddButton or SetTextInput to prompt the user for input when the task requires a decision.