How To Quickly Improve Your Power Apps Model-Driven View Look and Feel!
Power Apps Canvas Code Editor: EVERYTHING You Need To Know 🤯

Brian Knight explains the exciting new functionality in Power Apps Canvas applications. With this feature, users can now view the code behind any object in their application, make changes to it, and redeploy the updated code. This post summarizes the key points from the video and demonstrates how this feature can enhance your Power Apps development process.
1. Introduction to Power Apps Canvas Code Editor
Brian Knight introduces a new functionality in Power Apps Canvas that allows users to see the code behind any object in their applications. This feature is a game changer for those looking to fine-tune or replicate their canvas app elements efficiently.
2. Viewing the Code Behind Canvas Objects
To get started, Brian opens a simple canvas application that he created with a wizard. He demonstrates how users can view the code behind elements like buttons. To do this:
- Select the button or object.
- Right-click on the object and choose View Code Preview.
- The code that appears is written in YAML (YAML Ain't Markup Language), which is a long-standing format in the Microsoft ecosystem.
3. Editing and Copying the Code
Once users access the code, they can copy it and make modifications in an external editor like Notepad. Although direct code editing within Power Apps Canvas is not available at this stage, users can:
- Copy the code to a text editor (like Notepad).
- Edit the names, actions, and other parameters as needed (e.g., changing a button's function from 'Save' to 'Cancel').
- After editing, paste the modified code into another screen or container within the app.
4. Reusing Code Across Multiple Screens and Containers
Brian further demonstrates how the feature can be used to copy code from one screen or container and paste it into another, saving time and effort in replicating functionality. Here’s how:
- Right-click the container or screen and select View Code.
- Copy the code and paste it into another part of your app to quickly create consistent functionality across multiple screens.
- This can be especially useful for developers working on multiple applications or teams that need consistent design elements.
5. Benefits of Using the Code Editor
Brian outlines several key benefits of this new functionality:
- Efficiency: Developers can quickly copy and reuse code snippets across applications.
- Version Control: Code snippets can be stored and managed in source control systems for better organization.
- Consistency: Ensures that design elements like buttons and containers behave consistently across different screens and applications.
6. Future Possibilities
Though the ability to directly edit the code inside Power Apps Canvas is not yet available, Brian notes that this feature might be added in the future. For now, the ability to copy and paste code between screens and containers offers significant flexibility and convenience for app developers.
Conclusion
This new functionality in Power Apps Canvas is a highly requested feature, and its implementation will surely improve the efficiency of app development. By allowing developers to view and reuse code in a simplified way, it opens up more possibilities for creating powerful, consistent apps. Stay tuned for more tutorials from Brian Knight and Pragmatic Works for additional insights and tips on mastering the Power Platform.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Power Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
SQL Server MVP and founder of Pragmatic Works. Brian has been working with SQL Server as a DBA and business intelligence professional since 1998. He has written more than 15 books on the topic and has spoken at dozens of conferences.
Free Trial
On-demand learning
Most Recent
private training
Leave a comment