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

Headered controls #1599

Merged
merged 24 commits into from
Nov 10, 2017
Merged

Headered controls #1599

merged 24 commits into from
Nov 10, 2017

Conversation

skendrot
Copy link
Contributor

@skendrot skendrot commented Nov 7, 2017

Issue: #995

PR Type

What kind of change does this PR introduce?
Add HeaderedContentControl and HeaderedItemsControl

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build or CI related changes
[ ] Documentation content changes
[ ] Sample app changes
[ ] Other... Please describe:

What is the current behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Docs have been added / updated (for bug fixes / features)
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)

What is the new behavior?

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

@skendrot skendrot changed the title Headered controls [WIP] Headered controls Nov 7, 2017
@skendrot skendrot changed the title [WIP] Headered controls Headered controls Nov 7, 2017
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls">
<Style TargetType="controls:HeaderedContentControl">
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, why not stretch for these two values?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follows the style of the ContentControl

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will be in the documentation. As will information about why the Border* properties are not respected (b/c the ContentControl and ItemsControl do not)

{
}

private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't look like this is referenced anywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

/// </summary>
/// <param name="oldValue">The old value of the <see cref="Header"/> property.</param>
/// <param name="newValue">The new value of the <see cref="Header"/> property.</param>
protected virtual void OnHeaderChanged(object oldValue, object newValue)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following API from WPF

{
}

private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following API from WPF

@nmetulev nmetulev added this to the v2.1 milestone Nov 7, 2017
@nmetulev
Copy link
Contributor

nmetulev commented Nov 7, 2017

Looks good to me (other than the missing docs) :)

Copy link
Contributor

@Odonno Odonno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty good addition to the Toolkit. I left some comments but it seems good to me as is.

{
"Name": "HeaderedContentControl",
"Type": "HeaderedContentControlPage",
"About": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing description?

{
"Name": "HeaderedItemsControl",
"Type": "HeaderedItemsControlPage",
"About": "",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing description?

The `Header` property can be set to a string, or any xaml elements. If binding the `Header` to an object that is not a string, use the `HeaderTemplate` to control how the content is rendered.
```xaml
<controls:HeaderedControlControl Header="This is the header!"/>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we split into 2 code blocks?

@Odonno
Copy link
Contributor

Odonno commented Nov 10, 2017

There is a conflict with the master branch.

# Conflicts:
#	Microsoft.Toolkit.Uwp.SampleApp/Microsoft.Toolkit.Uwp.SampleApp.csproj
@skendrot
Copy link
Contributor Author

skendrot commented Nov 10, 2017

It didn't yesterday! 😝

@Odonno Odonno merged commit 9f66cdd into CommunityToolkit:master Nov 10, 2017
@windowstoolkitbot
Copy link

This PR is linked to unclosed issues. Please check if one of these issues should be closed: #995

@Nirmal4G
Copy link
Contributor

Nirmal4G commented Mar 6, 2021

Related: #3710 (Missing metadata for the DesignTime in VS IDE)

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

Successfully merging this pull request may close these issues.

5 participants