Skip to content

RC2: Triggers and MultiBindings do not inherit their parent datatype #25141

@daltzctr

Description

@daltzctr

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

Metadata

Metadata

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions