Share via


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

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

See Also

Reference

Task Class

Microsoft.Windows.Design.Interaction Namespace

Other Resources

Tool Architecture

WPF Designer Extensibility