Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to Add Option for Displaying Similar Properties on the Same Line in XamlStyler #496

Open
Sia819 opened this issue Jul 8, 2024 · 3 comments

Comments

@Sia819
Copy link

Sia819 commented Jul 8, 2024

I am using XamlStyler, and currently, similar properties such as Height and Width are displayed on separate lines. I would like to see an option that allows for these similar properties to optionally appear on the same line. For instance, HorizontalAlignment and VerticalAlignment should also be able to be displayed on the same line.

Current Behavior:
image

Desired Behavior:
image

Environment:

  • Visual Studio 2022
  • XAML Styler for Visual Studio 2022 (3.2404.2)
@Sia819 Sia819 added the Feature label Jul 8, 2024
@grochocki
Copy link
Contributor

This should be achievable with existing settings. Check out Separate By Groups (set to true) in conjunction with Attribute Tolerance (set to higher than your largest Attribute Ordering Rule Group).

@Sia819
Copy link
Author

Sia819 commented Jul 9, 2024

Thanks to your suggestion, I changed Separate by groups to True, allowing properties with similar characteristics to be displayed across multiple lines, which resolved the issue I was facing. However, while defining the order for Attribute ordering rule groups, I encountered a problem when the line *:*, * appears. Due to the Separate by groups setting, all properties that aren't predefined start to display on the same line.

Could you suggest a way to address this phenomenon? I've looked for similar issues but haven't found a solution that fits, as seen in #268.

Thank you for your continued support!

@grochocki
Copy link
Contributor

Hmm, that might require a change. Either tweak behavior of Separate By Groups to always special case the default wildcard group so it does not group those or create a separate setting to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants