PowerApps 中的条形码扫描程序控件(实验性)Barcode scanner control (experimental) in PowerApps

通过在设备上使用条形码扫描程序,用户可用来拍摄照片的实验性控件。An experimental 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 - 在具有多个条码扫描器的设备上,应用使用的条码扫描器的数字 ID。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 – 此控件是允许用户输入 (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.

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.