Layout.SetIndexBasedLayoutOrientation(IndexBasedLayoutOrientation) 方法

定义

设置 IndexBasedLayoutOrientation 属性的值。

protected:
 virtual void SetIndexBasedLayoutOrientation(IndexBasedLayoutOrientation orientation) = SetIndexBasedLayoutOrientation;
void SetIndexBasedLayoutOrientation(IndexBasedLayoutOrientation const& orientation);
protected void SetIndexBasedLayoutOrientation(IndexBasedLayoutOrientation orientation);
function setIndexBasedLayoutOrientation(orientation)
Protected Sub SetIndexBasedLayoutOrientation (orientation As IndexBasedLayoutOrientation)

参数

orientation
IndexBasedLayoutOrientation

枚举的值,指示根据项在源集合中的索引进行布局的方向(如果有)。

示例

public class MyHorizontalLayout : NonVirtualizingLayout
{
    public class MyHorizontalLayout()
    {
        SetIndexBasedLayoutOrientation(IndexBasedLayoutOrientation.LeftToRight);
        Debug.Assert(this.IndexBasedLayoutOrientation == IndexBasedLayoutOrientation.LeftToRight);
    }
}

适用于

另请参阅