在 Microsoft PowerApps 中自訂卡片Customize a card in Microsoft PowerApps

執行基本自訂 (不解除鎖定卡片),例如,變更其控制項。Perform basic customization (without unlocking a card) by, for example, changing its control. 執行進階自訂,例如解除鎖定卡片,或新增卡片預設所沒有的控制項。Perform advanced customization by unlocking the card and, for example, adding a control that isn't available for that card by default.

如需概觀,請參閱 Understand data cards (了解資料卡片)。For an overview, see Understand data cards.

必要條件Prerequisites

自訂鎖定的卡片Customize a locked card

在此程序中,您會將切換控制項取代為選項控制項,而不需要解除鎖定卡片。In this procedure, you'll replace a Toggle control with a Radio control without unlocking the card.

  1. EditScreen1 中,按一下或點選 [付費] 卡片,以選取它。In EditScreen1, click or tap the Paid card to select it.

  2. 在右側窗格中,按一下或點選 [付費] 卡片的卡片選取器,然後按一下或點選 [編輯選項]。In the right-hand pane, click or tap the card selector for the Paid card, and then click or tap Edit Options.

    畫面會反映您的變更。The screen reflects your change.

    如需哪些類型的 SharePoint 資料行支援哪些類型卡片的詳細資訊,請參閱已知問題For information about which types of SharePoint columns support which types of cards, see Known issues.

解除鎖定與自訂卡片Unlock and customize a card

在此程序中,您將會解除鎖定卡片,然後將文字輸入控制項取代為滑桿控制項。In this procedure, you'll unlock a card and then replace a Text input control with a Slider control.

  1. EditScreen1 中,按一下或點選 [數量] 卡片。In EditScreen1, click or tap the Quantity card.

  2. 在右側窗格中,按一下或點選該卡片的省略符號圖示,然後按一下或點選 [進階] 選項。In the right-hand pane, click or tap the ellipsis icon for that card, and then click or tap Advanced options.

    開啟進階選項

  3. 在右側窗格頂端,按一下或點選鎖定圖示以解除鎖定卡片。At the top of the right-hand pane, click or tap the lock icon to unlock the card.

    解除鎖定卡片

  4. 在卡片中,刪除輸入文字控制項,新增滑桿控制項,然後將新控制項命名為 QtySliderIn the card, delete the Input text control, add a Slider control, and name the new control QtySlider.

  5. 在右側窗格中,將 [數量] 卡片的 Update 屬性設定為以下公式:In the right-hand pane, set the Update property of the Quantity card to this formula:
    QtySlider.ValueQtySlider.Value

    注意

    如果 Update 屬性未出現,請按一下或點選 [資料] 區段底部的 [更多選項]。If the Update property doesn't appear, click or tap More options at the bottom of the Data section.

  6. 按一下或點選滑桿以選取它,然後再開啟右窗格頂端的控制項清單。Click or tap the slider to select it, and then open the list of controls at the top of the right-hand pane.

  7. 按一下或點選 ErrorMessage4,然後將其 Height 屬性設為以下公式︰Click or tap ErrorMessage4, and then set its Height property to this formula:
    QtySlider.Y + QtySlider.HeightQtySlider.Y + QtySlider.Height