Task.BeginFocus Method
Begins to set the focus for the task.
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public Sub BeginFocus ( _
data As GestureData _
)
public void BeginFocus(
GestureData data
)
public:
void BeginFocus(
GestureData^ data
)
member BeginFocus :
data:GestureData -> unit
public function BeginFocus(
data : GestureData
)
Parameters
- data
Type: Microsoft.Windows.Design.Interaction.GestureData
The gesture data for the focus.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | data is nulla null reference (Nothing in Visual Basic). |
InvalidOperationException | The task already has the focus. |
Remarks
When a task has the focus, all user input is directed at that task. Also, the task creates an editing scope. Therefore, all changes that were made while the task has the focus, flow into a single undo event. The focus can only be set on a task if it does not already have the focus.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace