PowerApps 中的形状控件和图标控件Shape controls and Icon controls in PowerApps

你可以为其配置外观和行为属性的图形。Graphics for which you can configure appearance and behavior properties.


这些控件包括箭头、几何形状、操作图标和符号,你可以为其配置诸如 fill、size 和 location 之类的属性。These controls include arrows, geometric shapes, action icons, and symbols for which you can configure properties such as fill, size, and location. 此外,还可以配置其 OnSelect 属性,以便应用在用户单击或点击控件时作出响应。You can also configure their OnSelect property so that the app responds if the user clicks or taps the control.

关键属性Key properties

Fill – 控件的背景颜色。Fill – The background color of a control.

OnSelect – 用户点击或单击某个控件时应用响应的方式。OnSelect – How the app responds when the user taps or clicks a control.

其他属性Additional properties

DisplayMode – 此控件是允许用户输入 (Edit)、仅显示数据 (View),还是已禁用 (Disabled)。DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).

Height – 控件上边缘和下边缘之间的距离。Height – The distance between a control's top and bottom edges.

HoverFill – 用户将鼠标指针停留在控件上时,该控件的背景颜色。HoverFill – The background color of a control when the user keeps the mouse pointer on it.

PressedBorderColor – 用户在点击或单击控件时,该控件边框的颜色。PressedBorderColor – The color of a control's border when the user taps or clicks that control.

FocusedBorderThickness – 控件具有键盘焦点时的边框粗细。FocusedBorderThickness – The thickness of the control's border when it has keyboard focus.

Visible – 控件显示还是隐藏。Visible – Whether a control appears or is hidden.

Width – 控件左边缘和右边缘之间的距离。Width – The distance between a control's left and right edges.

X - 控件左边缘与其父容器(如果没有父容器,则为屏幕)左边缘之间的距离。X – The distance between the left edge of a control and the left edge of its parent container (screen if no parent container).

Y - 控件上边缘与其父容器(如果没有父容器,则为屏幕)上边缘之间的距离。Y – The distance between the top edge of a control and the top edge of the parent container (screen if no parent container).

Navigate( ScreenName, ScreenTransition )Navigate( ScreenName, ScreenTransition )


  1. 将默认“屏幕”控件命名为“Target”,添加“标签”控件,然后将“Text”属性设置为显示“Target”。Name the default Screen control Target, add a Label control, and set its Text property to show Target.

    不知道如何添加和配置控件Don't know how to add and configure a control?

  2. 添加屏幕控件,然后将其命名为“Source”。Add a Screen control, and name it Source.
  3. 在“Source”中,添加“形状”控件,并将其 OnSelect 属性设置为以下公式:In Source, add a Shape control, and set its OnSelect property to this formula:
    Navigate(Target, ScreenTransition.Fade)Navigate(Target, ScreenTransition.Fade)
  4. 按 F5,然后单击或点击“形状”控件。Press F5, and then click or tap the Shape control.

    将会出现“Target”屏幕。The Target screen appears.

  5. (可选)按 Esc 返回默认工作区,向“Target”添加“形状”控件,并将“形状”控件的 OnSelect 属性设置为以下公式:(optional) Press Esc to return to the default workspace, add a Shape control to Target, and set the OnSelect property of the Shape control to this formula:
    Navigate(Source, ScreenTransition.Fade)Navigate(Source, ScreenTransition.Fade)