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

Add support for relative binding sources to TypedBinding #20415

Merged

Conversation

simonrozsival
Copy link
Member

Description of Change

The TypedBinding class didn't support relative binding sources. I implemented the missing functionality and there is now feature parity between classic Binding and TypedBinding. This will allow us to later compile more bindings in XAML into typed bindings using XamlC.

Issues Fixed

Fixes #20101

/cc @StephaneDelcroix

@simonrozsival simonrozsival requested a review from a team as a code owner February 7, 2024 10:44
@jsuarezruiz jsuarezruiz removed their request for review February 7, 2024 11:43
@jsuarezruiz jsuarezruiz added the area-xaml XAML, CSS, Triggers, Behaviors label Feb 7, 2024
@simonrozsival simonrozsival linked an issue Feb 9, 2024 that may be closed by this pull request
@rmarinho
Copy link
Member

/rebase

@github-actions github-actions bot force-pushed the typed-binding-relative-binding-source branch from f085d3c to d528179 Compare February 12, 2024 01:54
Copy link
Member

@rmarinho rmarinho left a comment

Choose a reason for hiding this comment

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

D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(122,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(123,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(124,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(245,9): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(246,9): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(247,9): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(248,9): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(257,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(258,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(1022,6): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(1026,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\MultiBindingTests.cs(1027,7): error CS0103: The name 'TypedBindingFactory' does not exist in the current context [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(35,80): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(69,86): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(105,81): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(395,82): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(396,100): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(400,82): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(401,100): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(405,82): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\RelativeSourceBindingTests.cs(406,94): error CS1739: The best overload for 'SetBinding' does not have a parameter named 'source' [D:\a\_work\1\s\src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj]
    5851 Warning(s)
    21 Error(s)

@rmarinho rmarinho merged commit d668f4c into dotnet:net9.0 Feb 13, 2024
45 of 47 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for RelativeBindingSource to TypedBinding
5 participants