Skip to content

Add Stretch for ContentAlignment on SettingsCard#854

Open
zhuxb711 wants to merge 1 commit into
CommunityToolkit:mainfrom
zhuxb711:settings-card-content-stretch
Open

Add Stretch for ContentAlignment on SettingsCard#854
zhuxb711 wants to merge 1 commit into
CommunityToolkit:mainfrom
zhuxb711:settings-card-content-stretch

Conversation

@zhuxb711
Copy link
Copy Markdown

@zhuxb711 zhuxb711 commented May 15, 2026

Fixes

This PR extends ContentAlignment

PR Type

What kind of change does this PR introduce?

  • New mode Stretch for settings card, which allows Content to use all available spaces and collapsed rest of UI elements

What is the current behavior?

  • Supports only Left, Right, Vertical currently
  • SettingsExpander.Items do not accept custom controls except SettingsCard by default because ItemContainerStyleSelector, even it supports, custom control still needs to simulate the paddings just like SettingsCard using Padding="58,8,44,8"

What is the new behavior?

  • New behavior creates the SettingsCard filled with Content within SettingsExpander
  • Provide a new way for developer to set custom layout/control under the SettingsExpander using SettingsCard
image

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)
  • Header has been added to all new source files
  • Contains NO breaking changes

Other information

@zhuxb711
Copy link
Copy Markdown
Author

@dotnet-policy-service agree

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant