FlowDirection 枚举

定义

定义指定方向的常数,连续的用户界面 (UI) 元素将按照该方向放入线性布局容器中。Defines constants that specify the direction in which consecutive user interface (UI) elements are placed in a linear layout container.

public enum class FlowDirection
public enum FlowDirection
type FlowDirection = 
Public Enum FlowDirection
继承
FlowDirection

字段

BottomUp 3

元素从设计图面的底部流到顶部。Elements flow from the bottom of the design surface to the top.

LeftToRight 0

元素从设计图面的左边缘流到右边缘。Elements flow from the left edge of the design surface to the right.

RightToLeft 2

元素从设计图面的右边缘流到左边缘。Elements flow from the right edge of the design surface to the left.

TopDown 1

元素从设计图面的顶部流到底部。Elements flow from the top of the design surface to the bottom.

示例

下面的示例演示如何在 @no__t 控件上设置 FlowDirection 属性。The following example shows how to set the FlowDirection property on a FlowLayoutPanel control. 此代码示例是为 FlowLayoutPanel 控件提供的更大示例的一部分。This code example is part of a larger example provided for the FlowLayoutPanel control.

private:
    void flowTopDownBtn_CheckedChanged(System::Object^ sender,
        System::EventArgs^ e)
    {
        this->flowLayoutPanel1->FlowDirection = FlowDirection::TopDown;
    }

private:
    void flowBottomUpBtn_CheckedChanged(System::Object^ sender,
        System::EventArgs^ e)
    {
        this->flowLayoutPanel1->FlowDirection = FlowDirection::BottomUp;
    }

private:
    void flowLeftToRight_CheckedChanged(System::Object^ sender,
        System::EventArgs^ e)
    {
        this->flowLayoutPanel1->FlowDirection =
            FlowDirection::LeftToRight;
    }

private:
    void flowRightToLeftBtn_CheckedChanged(
        System::Object^ sender, System::EventArgs^ e)
    {
        this->flowLayoutPanel1->FlowDirection =
            FlowDirection::RightToLeft;
    }
private void flowTopDownBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.TopDown;
}

private void flowBottomUpBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.BottomUp;
}

private void flowLeftToRight_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight;
}

private void flowRightToLeftBtn_CheckedChanged(
    System.Object sender, 
    System.EventArgs e)
{
    this.FlowLayoutPanel1.FlowDirection = FlowDirection.RightToLeft;
}
Private Sub flowTopDownBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowTopDownBtn.CheckedChanged

    Me.FlowLayoutPanel1.FlowDirection = FlowDirection.TopDown

End Sub

Private Sub flowBottomUpBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowBottomUpBtn.CheckedChanged

    Me.FlowLayoutPanel1.FlowDirection = FlowDirection.BottomUp

End Sub

Private Sub flowLeftToRight_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowLeftToRight.CheckedChanged

    Me.FlowLayoutPanel1.FlowDirection = FlowDirection.LeftToRight

End Sub

Private Sub flowRightToLeftBtn_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles flowRightToLeftBtn.CheckedChanged

    Me.FlowLayoutPanel1.FlowDirection = FlowDirection.RightToLeft

End Sub

注解

@No__t-0 枚举描述了设计图面上的连续 UI 元素(通常为控件)的流动方向,如窗体。The FlowDirection enumeration describes the flow direction of consecutive UI elements, typically controls, on a design surface or container such as a form. 线性布局容器(例如 FlowLayoutPanel)使用此枚举,这会在 FlowLayoutPanel.FlowDirection 属性内部存储此信息。This enumeration is used by linear layout containers such as FlowLayoutPanel, which stores this information internally in the FlowLayoutPanel.FlowDirection property.

@No__t-0 确定将新控件添加到支持容器时默认放置的位置。The FlowDirection determines where a new control is placed by default when it is added to a supporting container. 容器的流动方向,以及每个包含控件的 Anchor 和 @no__t 属性,确定调整控件的容器大小时,控件的重新排列。The flow direction of the container, along with the Anchor and Dock properties of each contained control, determine the rearrangement of controls when their container is resized.

@No__t-0 控件向其子控件提供 @no__t 1 属性。The FlowLayoutPanel control provides a FlowBreak property to its child controls. 如果将 FlowBreak 属性的值设置为 true,则将导致 @no__t 2 控件停止当前流方向的控件布局,并换行到下一行或下一列。Setting the value of the FlowBreak property to true causes the FlowLayoutPanel control to stop laying out controls in the current flow direction and wrap to the next row or column.

适用于

另请参阅