PlacementAdapter 类

更新: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,请先查询它,以确定它是否可以设置您在设置中感兴趣的位置。然后,使用此查询的结果通过 GetPlacementSetPlacements 方法获取和设置值。

继承层次结构

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) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

另请参见

参考

PlacementAdapter 成员

Microsoft.Windows.Design.Interaction 命名空间

AdornerPlacementCollection

AdornerPanel

其他资源

演练:创建设计时装饰器

装饰器体系结构