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

[WIP] Header, headers, headers #1825

Closed
wants to merge 1 commit into from
Closed

[WIP] Header, headers, headers #1825

wants to merge 1 commit into from

Conversation

flagbug
Copy link
Member

@flagbug flagbug commented Mar 2, 2015

The Windows 8/WinRT/ModernUI/Whatever XAML framework has the really cool feature of "headers" for some controls

2015-03-02 19 29 26

These are two TextBoxes, declared in XAML as following;

<StackPanel Orientation="Vertical">
    <TextBox Header="Username" Height="50" Width="150" />
    <TextBox Header="Password" Height="50" Width="150" />
</StackPanel>

This PR adds this feature via an attached property to some of the controls

2015-03-02 19 21 20

TODO

  • How big should the header be?
  • Implement it for all TextBoxes
  • HeaderTemplate property because people want to customize
  • Additional controls?

@thoemmi
Copy link
Collaborator

thoemmi commented Mar 2, 2015

It's very similar to the existing TextBoxHelper.UseFloatingWatermark, but I like it 😄
image

@punker76 punker76 added this to the 1.2.0 milestone Mar 4, 2015
@jimbobsmith
Copy link

Just my 2 cents. The way I handled this in my projects was to create a header control which acts as a container for any input control. In this way, I only had to create a single control and can easily use it for any type of input control. I used a Label internally and handled the target binding internally etc. It is a bit more work to use that than to just add a property value but also avoids having to care about input control specific implementations.
e.g.
<Header Header="Some _Header>
<TextBox Text={Binding SomeTextValue} />
</Header>

@AzureKitsune
Copy link
Member

👍

@punker76 punker76 removed this from the 1.2.0 milestone May 5, 2015
@punker76 punker76 changed the base branch from master to develop October 9, 2016 16:58
@amkuchta
Copy link
Contributor

@punker76 @flagbug @thoemmi @jimbobsmith @Amrykid , I know that this is an old item, but I cam across it and had a thought about it - I'm just not sure how well it will be received...

What if, instead of having the Header be a separate property, we somehow modified the location of the floating watermark (e.g TextBoxhelper.WatermarkFloatLocation="Interior" or TextBoxHelper.WatermarkFloatLocation="Exterior"). You could even go a step farther by picking side (e.g. InteriorTop, InteriorLeft, ExteriorBottom, ExteriorRight, etc.). Again, I am not sure as to how well this merges the two ideas, but it might be a nifty way to utilize a property that already exists.

Thoughts...?

@punker76
Copy link
Member

@amkuchta I don't like the idea to enhance the watermark. I'm more with a new control like the Badged control. A ContentControl which can take any stuff and surround it with a Header text...

@thoemmi
Copy link
Collaborator

thoemmi commented Mar 14, 2017

I agree with @punker76. Watermarks and headers are two different paradigms which shouldn't be mixed.

@amkuchta
Copy link
Contributor

@punker76 @thoemmi sounds good to me - I still would like to see the external floating watermark in addition to the new Header control (I don't want headers that always show, only when there is text in the control. When the control is empty, I want the instructions to be a watermark simply because I think it looks cleaner that way). I generated some code and accidentally rolled it into #2892 🤣 . However, I am now stuck on it 💩 . Any insight/help you guys could provide would be awesome. I'm trying to become a more active contributor instead of being a sponge who pushes ideas and issues but never offers to help...

@thoemmi thoemmi mentioned this pull request Apr 20, 2017
8 tasks
@punker76 punker76 deleted the headers branch October 12, 2017 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants