UID | title | description | helpviewer_keywords | old-location | tech.root | ms.assetid | ms.date | ms.keywords | req.header | req.include-header | req.target-type | req.target-min-winverclnt | req.target-min-winversvr | req.kmdf-ver | req.umdf-ver | req.ddi-compliance | req.unicode-ansi | req.idl | req.max-support | req.namespace | req.assembly | req.type-library | req.lib | req.dll | req.irql | targetos | req.typenames | req.redist | ms.custom | f1_keywords | dev_langs | topic_type | api_type | api_location | api_name | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NF:directmanipulation.IDirectManipulationViewport2.AddBehavior |
IDirectManipulationViewport2::AddBehavior (directmanipulation.h) |
Adds a behavior to the viewport and returns a cookie to the caller. |
|
directmanipulation\idirectmanipulationviewport2_addbehavior.htm |
directmanipulation |
E65CF2A3-EF44-4B4E-A8C5-7DC75345B5A6 |
12/05/2018 |
AddBehavior, AddBehavior method [Direct Manipulation], AddBehavior method [Direct Manipulation],IDirectManipulationViewport2 interface, IDirectManipulationViewport2 interface [Direct Manipulation],AddBehavior method, IDirectManipulationViewport2.AddBehavior, IDirectManipulationViewport2::AddBehavior, directmanipulation.idirectmanipulationviewport2_addbehavior, directmanipulation/IDirectManipulationViewport2::AddBehavior |
directmanipulation.h |
Windows |
Windows 8.1 [desktop apps only] |
Windows Server 2012 R2 [desktop apps only] |
DirectManipulation.idl |
Windows |
19H1 |
|
|
|
|
|
|
Adds a behavior to the viewport and returns a cookie to the caller.
A behavior created using the CreateBehavior method.
A cookie is returned so the caller can remove this behavior later. This allows the caller to release any reference on the behavior and let Direct Manipulation maintain an appropriate lifetime, similar to event handlers.
If the method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. Attaching a behavior that is already attached to this viewport or another viewport results in a failure.
A behavior takes effect immediately after AddBehavior is called. This must be considered when adding a behavior during an active manipulation or inertia phase.