nerdexam
Microsoft

PL-100 · Question #277

You design a canvas app that has multiple screens. Each screen will have multiple button controls. The button controls must all have the same background color. You must be able to change the color…

The correct answer is B. Update the Fill property to a variable created by using the Set function. To configure button controls with a uniform background color that can be changed centrally, update the Fill property of each button to a variable created by using the Set function.

Create business solutions

Question

You design a canvas app that has multiple screens. Each screen will have multiple button controls. The button controls must all have the same background color. You must be able to change the color from one location for all buttons. You need to configure the button fill property. What should you do?

Options

  • AUpdate the Fill property to a variable created by using the Navigate function.
  • BUpdate the Fill property to a variable created by using the Set function.
  • CSelect all the buttons while holding the Ctrl key, and then change the color property.
  • DUse a background image property in place of setting a color property.

How the community answered

(27 responses)
  • A
    7% (2)
  • B
    81% (22)
  • C
    11% (3)

Why each option

To configure button controls with a uniform background color that can be changed centrally, update the Fill property of each button to a variable created by using the Set function.

AUpdate the Fill property to a variable created by using the Navigate function.

The `Navigate` function is used for screen navigation and does not create or update variables for control properties.

BUpdate the Fill property to a variable created by using the Set function.Correct

By setting a global variable (e.g., `Set(MyButtonColor, Color.Blue)`) and then assigning `MyButtonColor` to the `Fill` property of all button controls, you can change the color from one central location where the variable is defined, and all buttons will update instantly.

CSelect all the buttons while holding the Ctrl key, and then change the color property.

Selecting all buttons and changing their color property would work for an initial setup, but it does not allow for changing the color from one location dynamically later.

DUse a background image property in place of setting a color property.

Using a background image property would replace the color with an image and is an inefficient way to manage a simple color change from a single source.

Concept tested: Canvas app global variables and control properties

Source: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/working-with-variables

Topics

#Power Apps#Canvas Apps#Global Variables#Control Properties

Community Discussion

No community discussion yet for this question.

Full PL-100 Practice