PowerApps 中的評等控制項Rating control in PowerApps

使用者可用來指出 1 與您指定的最大數目之間的值的控制項。A control with which users can indicate a value between 1 and a maximum number that you specify.


例如,在此控制項中,使用者可以選取星星數目來指出他們對某個項目的喜歡程度。In this control, the user can indicate, for example, how much they liked something by selecting a certain number of stars.

主要屬性Key properties

Default – 控制項在使用者變更之前的初始值。Default – The initial value of a control before it is changed by the user.

Max – 使用者可以設定滑桿或評等的最大值。Max – The maximum value to which the user can set a slider or a rating.

其他屬性Additional properties

BorderColor – 控制項框線的色彩。BorderColor – The color of a control's border.

BorderStyle – 決定控制項的框線為實線虛線點線BorderStyle – Whether a control's border is Solid, Dashed, Dotted, or None.

BorderThickness – 控制項框線的粗細。BorderThickness – The thickness of a control's border.

FocusedBorderThickness – 控制項具有鍵盤焦點時的框線粗細。FocusedBorderThickness – The thickness of the control's border when it has keyboard focus.

DisplayMode – 控制項允許使用者輸入 (編輯)、只顯示資料 (檢視) 或者已停用 (停用)。DisplayMode – Whether the control allows user input (Edit), only displays data (View), or is disabled (Disabled).

Fill – 控制項的背景色彩。Fill – The background color of a control.

Height – 控制項的頂端和底部邊緣之間的距離。Height – The distance between a control's top and bottom edges.

OnChange – 使用者變更控制項的值 (例如,調整滑桿) 時,應用程式的回應方式。OnChange – How the app responds when the user changes the value of a control (for example, by adjusting a slider).

OnSelect – 在使用者點選或按一下控制項時,應用程式的回應方式。OnSelect – How the app responds when the user taps or clicks a control.

RatingFill – 評等控制項中星星的色彩。RatingFill – The color of the stars in a rating control.

ReadOnly – 使用者是否可以變更滑桿或評等控制項的值。ReadOnly – Whether a user can change the value of a slider or rating control.

Reset – 控制項是否還原為其預設值。Reset – Whether a control reverts to its default value.

ShowValue – 使用者變更該值或將滑鼠指標停留在控制項上方時,顯示滑桿的值還是評等的值。ShowValue – Whether a slider's or rating's value appears as the user changes that value or hovers over the control.

TabIndex – 自訂控制項在設定為非零值時於執行階段的定位順序。TabIndex – Customizes the tab order of controls at runtime when set to a non-zero value.

Tooltip – 使用者將滑鼠指標停留在控制項上方時所顯示的說明文字。Tooltip – Explanatory text that appears when the user hovers over a control.

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).

Average( Value1, Value2, ... )Average( Value1, Value2, ... )


  1. 新增評等控制項,並將其命名為 QuantitativeAdd a Rating control, and name it Quantitative.

    不知道如何新增、命名和設定控制項嗎?Don't know how to add, name, and configure a control?

  2. 新增文字輸入控制項,並將其命名為 Qualitative,然後將它移至評等控制項下方。Add a Text input control, name it Qualitative, and move it below the Rating control.
  3. 文字輸入控制項的 Default 屬性設定為 "",並將其 HintText 設定為以下公式:Set the Default property of the Text input control to "", and set its HintText to this formula:
    If(Quantitative.Value > 3, "What did you especially like?", "How might we do better?")If(Quantitative.Value > 3, "What did you especially like?", "How might we do better?")

    想要了解 If 函式或其他函式的詳細資訊嗎?Want more information about the If function or other functions?

  4. 按下 F5 鍵,然後按一下或點選評等控制項中的四或五顆星。Press F5, and then click or tap either four or five stars in the Rating control.

    文字輸入控制項中的提示文字會變更,以反映高評等。The hint text in the Text input control changes to reflect the high rating.

  5. 在 [Quantitative] 中按一下或點選四顆以下的星星。Click or tap fewer than four stars in Quantitative.

    文字輸入控制項中的提示文字會變更,以反映低評等。The hint text in the Text input control changes to reflect the low rating.

  6. 若要返回預設工作區,請按下 Esc 鍵。To return to the default workspace, press Esc.