更新:2007 年 11 月
一个用于获取和设置对象在父坐标中的位置的适配器。
命名空间: Microsoft.Windows.Design.Interaction
程序集: Microsoft.Windows.Design.Extensibility(在 Microsoft.Windows.Design.Extensibility.dll 中)
语法
声明
Public MustInherit Class PlacementAdapter _
Inherits Adapter
用法
Dim instance As PlacementAdapter
public abstract class PlacementAdapter : Adapter
public ref class PlacementAdapter abstract : public Adapter
public abstract class PlacementAdapter extends Adapter
备注
PlacementAdapter 由抓取控点用来调整控件大小和移动控件。位置适配器的工作原理是支持读取和写入值作为相对位置。对于 PlacementAdapter 而言,所有对象都是相对的,因此相对差值(增量)很重要。PlacementAdapter 提取相对值,并将其转换为一个或多个属性集。若要使用 PlacementAdapter,请先查询它,以确定它是否可以设置您在设置中感兴趣的位置。然后,使用此查询的结果通过 GetPlacement 和 SetPlacements 方法获取和设置值。
继承层次结构
System.Object
Microsoft.Windows.Design.Features.FeatureProvider
Microsoft.Windows.Design.Interaction.Adapter
Microsoft.Windows.Design.Interaction.PlacementAdapter
Microsoft.Windows.Design.Interaction.RootPlacementAdapter
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。
另请参见
参考
Microsoft.Windows.Design.Interaction 命名空间