-
Notifications
You must be signed in to change notification settings - Fork 1.9k
RC2: Triggers and MultiBindings do not inherit their parent datatype #25141
Copy link
Copy link
Closed
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsfixed-in-9.0.10platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Milestone
Description
Description
Triggers such as DataTrigger and Multibindings do not inherit their parent datatype. This is likely due to #24513. This triggers an XC0022 unless explicitly declaring datatype in the binding itself.
These bindings did not trigger any warnings in .NET 9 RC 1
Steps to Reproduce
<MultiBinding Mode="TwoWay" StringFormat="{}Version ({0})">
<Binding Path="Version.Version"/>
</MultiBinding>
or
<DataTrigger
Binding="{Binding MyObject.IsDoingAction}"
TargetType="Button"
Value="True">
<Setter Property="Text" Value="DOING ACTION" />
<Setter Property="BackgroundColor" Value="Green" />
</DataTrigger>
triggers an XC0022
Link to public reproduction project repository
No response
Version with bug
9.0.0-rc.1.24453.9
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
No response
Did you find any workaround?
Explicitly declare the DataType in the bindings inside of MultiBinding or DataTrigger
Relevant log output
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-xamlXAML, CSS, Triggers, BehaviorsXAML, CSS, Triggers, Behaviorsfixed-in-9.0.10platform/androidplatform/iosplatform/macosmacOS / Mac CatalystmacOS / Mac Catalystplatform/windowss/triagedIssue has been reviewedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering TriageVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done