Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[C] bind to ValueTuples #1317

Merged
merged 2 commits into from Dec 11, 2017
Merged

[C] bind to ValueTuples #1317

merged 2 commits into from Dec 11, 2017

Conversation

StephaneDelcroix
Copy link
Member

@StephaneDelcroix StephaneDelcroix commented Dec 5, 2017

Description of Change

Allow ValueTuple shorthand names to be used in Binding paths.

public class Person {
    public (string First, string Last) Name { get; set; }
}

Allow this kind of Binding path

<Label Text="{Binding Name.First}" />

It also allows to bind to anonymous tuples using the indexer (that should have worked already, but wasn't). This is possible as ValueTuple implements ITuple.

<Label Text="{Binding Name[0]}" />

Bugs Fixed

/

API Changes

/

Behavioral Changes

/

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@StephaneDelcroix StephaneDelcroix merged commit 2a177ec into master Dec 11, 2017
@StephaneDelcroix StephaneDelcroix deleted the bindToValueTuple branch December 11, 2017 21:32
@samhouts samhouts added this to the 3.0.0 milestone May 5, 2018
@samhouts samhouts modified the milestones: 3.0.0, 2.5.0 Aug 23, 2019
@samhouts samhouts modified the milestones: 3.0.0, 2.5.0 Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants