PlacementAdapter Class
An adapter that is used to get and set positions of objects in parent coordinates.
Inheritance Hierarchy
System.Object
Microsoft.Windows.Design.Features.FeatureProvider
Microsoft.Windows.Design.Interaction.Adapter
Microsoft.Windows.Design.Interaction.PlacementAdapter
Microsoft.Windows.Design.Interaction.RootPlacementAdapter
Namespace: Microsoft.Windows.Design.Interaction
Assembly: Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)
Syntax
'Declaration
Public MustInherit Class PlacementAdapter _
Inherits Adapter
public abstract class PlacementAdapter : Adapter
public ref class PlacementAdapter abstract : public Adapter
[<AbstractClass>]
type PlacementAdapter =
class
inherit Adapter
end
public abstract class PlacementAdapter extends Adapter
The PlacementAdapter type exposes the following members.
Constructors
Name | Description | |
---|---|---|
PlacementAdapter | Initializes a new instance of the PlacementAdapter class. |
Top
Properties
Name | Description | |
---|---|---|
AdapterType | Gets the type of adapter this class represents. (Overrides Adapter.AdapterType.) |
Top
Methods
Name | Description | |
---|---|---|
BeginPlacement | Begins the placement operation. | |
CanSetPosition | Returns a value that indicates whether the specified coordinate can be set. | |
EndPlacement | Ends the placement operation. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetPlacement | Returns a collection of positions that describe the placement of the specified item. | |
GetPlacementBoundary(ModelItem) | Gets the boundary of the specified item parent. | |
GetPlacementBoundary(ModelItem, PlacementIntent, array<RelativeValue[]) | Gets the boundary of the specified item's parent. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
SetNudgePlacements(ModelItem, NudgeIntent, array<RelativeValue[]) | Assigns the specified array of positions for moving controls during keyboard nudges. | |
SetNudgePlacements(ModelItem, NudgeIntent, RelativeValueCollection) | Assigns the specified collection of positions for moving controls during keyboard nudges. | |
SetPlacements(ModelItem, PlacementIntent, array<RelativeValue[]) | Assigns the specified array of positions to the specified model item. | |
SetPlacements(ModelItem, PlacementIntent, RelativeValueCollection) | Assigns the specified collection of positions to the specified model item. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Remarks
PlacementAdapter is used by grab handles to size and move controls. Placement adapters work by supporting reading and writing values as relative positions. To a PlacementAdapter everything is relative, so relative difference (deltas) are important. A PlacementAdapter takes a relative value and converts it into one or more property sets. To use a PlacementAdapter first query it to see whether it can set a position you are interested in setting. Then, use the results of this to get and set values through the GetPlacement and SetPlacements methods.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also
Reference
Microsoft.Windows.Design.Interaction Namespace