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

Add new Horizontal ContentAlignment for SettingsCard #578

Closed
wants to merge 10 commits into from

Conversation

ProJend
Copy link

@ProJend ProJend commented Dec 1, 2024

Fixes #577

PR Type

What kind of change does this PR introduce?
Other: Feature added

What is the current behavior?

屏幕截图 2024-12-01 210755

What is the new behavior?

屏幕截图 2024-12-01 210754

PR Checklist

Please check if your PR fulfills the following requirements:

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • Tested code with current supported SDKs
  • New component
    • Documentation has been added
    • Sample in sample app has been added
    • Analyzers are passing for documentation and samples
    • Icon has been created (if new sample) following the Thumbnail Style Guide and templates
  • Tests for the changes have been added (if applicable)
  • Contains NO breaking changes

Other information

@ProJend ProJend changed the title Make settings content fully stretch the available area Make settings content fully stretch the available area in SettingsCard Dec 1, 2024
@ProJend
Copy link
Author

ProJend commented Dec 1, 2024

@ProJend please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@dotnet-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@dotnet-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@dotnet-policy-service agree company="Microsoft"

Contributor License Agreement

@dotnet-policy-service agree

@niels9001
Copy link
Collaborator

@ProJend Just to be sure, have you tried this change with the different SettingsCard samples in the Gallery app?

There are a couple of alignment settings you could set that might already achieve the same result (see the Gallery samples)?

@ProJend
Copy link
Author

ProJend commented Dec 2, 2024

@niels9001 Not yet. This is my first time to request pull. It should take more time to test more samples.

And the couple of alignment settings is not working for settings content. I think it's better to use VisualState to stretch automatically both settings header and settings content in SettingsCard

@Arlodotexe Arlodotexe requested a review from niels9001 December 2, 2024 17:45
@niels9001
Copy link
Collaborator

@ProJend Your proposed changes break the correct wrapping of the subtitle:

SettingsControls

What this should look like:

image

@ProJend ProJend changed the title Make settings content fully stretch the available area in SettingsCard Make settings content horizontal stretch the available area in SettingsCard Dec 3, 2024
@ProJend ProJend changed the title Make settings content horizontal stretch the available area in SettingsCard Make settings content horizontally stretch the available area in SettingsCard Dec 3, 2024
@ProJend ProJend changed the title Make settings content horizontally stretch the available area in SettingsCard Make settings content horizontally align in SettingsCard Dec 3, 2024
@ProJend ProJend changed the title Make settings content horizontally align in SettingsCard Add new Horizontal ContentAlignment for SettingsCard Dec 4, 2024
@michael-hawker michael-hawker marked this pull request as draft December 4, 2024 07:27
@ProJend
Copy link
Author

ProJend commented Dec 4, 2024

@niels9001 I have reverted back to default style. It should repair the breaking wrapping layout.

Unfortunately I don't know how to test them in the gallery, so not sure whether ContentAlignment="Horizontal" and SettingsCardHeaderPanelMaxWidth both work properly.

@ProJend ProJend closed this Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Settings content can’t horizontally align in SettingsCard
2 participants