PowerApps 中的條碼掃描器控制項Barcode scanner control in PowerApps

使用者可用來透過使用裝置上的條碼掃描器來拍照的控制項。A control with which the user can take photos by using the barcode scanner on the device.


如果您新增此控制項,使用者可以從應用程式執行的任何位置,使用一或多張相片來更新資料來源。If you add this control, the user can update a data source with one or more photos from wherever the app is running.

主要屬性Key properties

條碼掃描器 – 在有多個條碼掃描器的裝置上,應用程式所使用條碼掃描器的數值識別碼。barcode scanner – On a device that has more than one barcode scanner, the numeric ID of the barcode scanner that the app uses.

其他屬性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.

Brightness – 使用者想要看到的影像亮度。Brightness – How much light the user is likely to perceive in an image.

Contrast – 使用者如何輕鬆地區分影像中的類似色彩。Contrast – How easily the user can distinguish between similar colors in an image.

DisplayMode – 控制項允許使用者輸入 (編輯)、只顯示資料 (檢視) 或者已停用 (停用)。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.

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

OnStream – 更新 Stream 屬性時,應用程式的回應方式。OnStream – How the app responds when the Stream property is updated.

Photo – 使用者拍攝圖片時所擷取的影像。Photo – The image captured when the user takes a picture.

Stream – 根據 StreamRate 屬性自動更新影像。Stream – Automatically updated image based on the StreamRate property.

StreamRate – 在 Stream 屬性上更新影像的頻率 (以毫秒為單位)。StreamRate – How often to update the image on the Stream property, in milliseconds. 這個值的範圍可介於 100 (1/10 秒) 到 3,600,000 (1 小時)。This value can range from 100 (1/10th of a second) to 3,600,000 (1 hour).

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

Zoom – 條碼掃描器中影像的放大百分比,或 PDF 檢視器中檔案的檢視百分比。Zoom – The percentage by which an image from a barcode scanner is magnified or the view of a file in a PDF viewer.

Patch( DataSource, BaseRecord, ChangeRecord )Patch( DataSource, BaseRecord, ChangeRecord )


  1. 新增條碼掃描器控制項,並將其命名為 Mybarcode scannerAdd a barcode scanner control, name it Mybarcode scanner

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

  2. 新增標籤控制項,並將其輸出設定為條碼的值。Add a Label control and set its output to the Barcode's value.
  3. 掃描在 BarcodeType 屬性下所設定類型的條碼。Scan a barcode of the type set under BarcodeType property.
  4. 標籤便會顯示掃描的條碼。The label is going to display the scanned barcode.