Skip to content

Settings content can’t horizontally align in SettingsCard #577

Closed

Description

@ProJend

Describe the bug

I’m trying to add an additional image in the SettingsCard. It’s supposed to stretch the available area in SettingsCard but only align to the right side. Many available areas will be lost in the middle of SettingsCard

Steps to reproduce

1. Open any SettingsCard
2. Add an additional content such as image in the SettingsCard

Expected behavior

Settings content fully stretch the available area in SettingsCard

Screenshots

Image

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 10 21H2 (Build 19044)
  • Windows 10 22H2 (Build 19045)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Windows 10, version 2104 (Build 20348)
  • Windows 11, version 22H2 (Build 22000)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

2022

Visual Studio Build Number

No response

Device form factor

Desktop

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item.

Activity

  1. niels9001 commented on Dec 2, 2024

    @niels9001
    Collaborator

    @ProJend It's not entirely clear what the use case is that you are trying to implement. Do you have an example of your app's UI where you are running into the alignment issue with SettingsCard?

  2. changed the title [-]Settings content can’t fully stretch the available area in SettingsCard[/-] [+]Settings content can’t horizontally stretch the available area in SettingsCard[/+] on Dec 3, 2024
  3. changed the title [-]Settings content can’t horizontally stretch the available area in SettingsCard[/-] [+]Settings content can’t horizontally align in SettingsCard[/+] on Dec 3, 2024
  4. ProJend commented on Dec 4, 2024

    @ProJend
    Author

    @niels9001 Sample see a1a3a63
    image

  5. ProJend commented on Feb 19, 2025

    @ProJend
    Author

    @niels9001 I have fixed the bug. the new way is only customize the SettingsCard.Header and SettingsCard.Description.

    <controls:SettingsCard>
        <controls:SettingsCard.Header>
            <StackPanel>
                <TextBlock>Header</TextBlock>
                <TextBlock
                    FontSize="12"
                    Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                    TextWrapping="Wrap">
                    Description
                </TextBlock>
            </StackPanel>
        </controls:SettingsCard.Header>
        <controls:SettingsCard.Description>
            <Grid>
                <!--  To do ...Content  -->
            </Grid>
        </controls:SettingsCard.Description>
    </controls:SettingsCard>
    

    I will keep tracking the related RP #582 if you need it. Thank you

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions