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

Proposal: Support alignment of "Header" for controls on left side of control #4643

Open
omnilogix opened this issue Mar 24, 2021 · 5 comments
Assignees
Labels
feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@omnilogix
Copy link

Proposal: [Support alignment of "Header" for controls on left side of control]

image

Summary

Currently the Header property of controls is displayed above the control. Aligning the header inline and to the left of the control should be supported

Rationale

  • Many LOB apps have a high density of information and require maximizing the available space.
  • Since a desktop screen is generally wider than it is tall, multiple columns of information are often displayed.
  • Scrolling is not desirable in a LOB application, causing the user to do more input
  • Supporting a left side header would greatly reduce the Xaml required to create the header labels

Scope

Add or modify existing control properties to support a Left oriented header

Important Notes

Open Questions

@omnilogix omnilogix added the feature proposal New feature proposal label Mar 24, 2021
@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2021
@marcelwgn
Copy link
Collaborator

This seems like a very good idea! A possible "workaround" until then would be to introduce a separate styles for those controls that would place the header to the left (right in RTL).

@mdtauk
Copy link
Contributor

mdtauk commented Mar 24, 2021

Here are some initial questions...

  • Does the control get aligned to the right with the header taking up the remaining space on the left?
  • Does the Width property include the header, or just the control itself?
  • Does this support Right alignment of the header, either as a ''HeaderPosition'' property or just for RtL scenarios?
  • Does this have to be set on each control, or could it be a panel resource, affecting all children?
  • Does this become a property on Controls, or as part of a Form Control as with this proposal Feature Proposal: Form Control #82 ?
  • How do you ensure the space given to Left or Right aligned headers, matches other controls alongside, so controls are aligned together in a column?

@StephenLPeters StephenLPeters added the team-Controls Issue for the Controls team label Mar 24, 2021
@StephenLPeters StephenLPeters removed the needs-triage Issue needs to be triaged by the area owners label Mar 24, 2021
@omnilogix
Copy link
Author

Here are some initial questions...

  • Does the control get aligned to the right with the header taking up the remaining space on the left?

I think the control would fill the "Width" and the header would have a "HeaderWidth" and "HeaderPosition"

  • Does the Width property include the header, or just the control itself?

Width would be consistent with existing controls, just specifying the width of the control itself

  • Does this support Right alignment of the header, either as a ''HeaderPosition'' property or just for RtL scenarios?

With separate width for the header and alignment properties it could work with RTL as well

  • Does this have to be set on each control, or could it be a panel resource, affecting all children?

It would be great to have as a panel resource, maybe event a "FormsPanel" to facilitate this type of layout where the HeaderWidth, HeaderRTL, and HeaderHorizontalAlignment would go. This would set a standard spacing and alignment for all members within the panel. That would be really efficient and ease the layout process

A control property was the initial thought, but a wrapper panel seems even better

  • How do you ensure the space given to Left or Right aligned headers, matches other controls alongside, so controls are aligned together in a column?

In WPF grid there was a shared column size property that suited this type of scenario, but the panel idea might be better

@omnilogix
Copy link
Author

omnilogix commented Mar 25, 2021

Something like this...
image

<StackPanel Orientation = Horizontal>
    <FormsPanel HeaderWidth="Auto" ControlWidth="*" HeaderPosition="Left" HeaderContentAlignment="Right" BorderBrush="Pink" BorderThickness="1"  VerticalAlignment="Top" Padding="5">
        <TextBox FormsPanel.Header="Id"  Text="{Binding Id}/>
        <TextBox FormsPanel.Header="Name" Text="{Binding Name}/>
    </FormsPanel>

    <FormsPanel HeaderWidth="Auto" ControlWidth="*" HeaderPosition="Left" HeaderContentAlignment="Right" BorderBrush="Pink" BorderThickness="1"  VerticalAlignment="Top" Padding="5">
        <TextBox FormsPanel.Header="Address"  Text="{Binding Address}/>
        <TextBox FormsPanel.Header="City" Text="{Binding City}/>
    </FormsPanel>
</StackPanel>

Making a simple panel like this would be perfect. You could place any number of panels within your page to get the desired result.

Maybe with some formatting options for the header, like padding, margin, etc., and a HeaderTemplate for full control?

@heartacker
Copy link

we need this Place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

6 participants