Hi @Ante Gavranovic
To format the code in the VS 2022, you can try to use the following methods:
- Format Entire Document.
Hot Key: Ctrl+K, Ctrl+D
Menu: Edit => Advanced => Format Document. - Format select Document.
Hot Key: Ctrl+K, Ctrl + F
Menu: Edit => Advanced => Format Selection document. - Use Tab key. Select the relate code, then click the Tab key.
- Use Spacebar key. Move the cursor before the attribute or elements, then click the Spacebar.
Refer to the following screenshot:
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion