Skip to content

Entry background not accurate when changed with Triggers #5084

@nogginbox

Description

@nogginbox

Description

See @Redth comment below

I had a data trigger in my app that I couldn't get working in a DataTemplate. I decided to check I understood triggers by following the examples in the Maui Documentation.

The very first example did not work in Windows or Android. This was a simple example with an entry that should have turned yellow when it got focus. There was no visual change when it received focus.

Steps to Reproduce

  1. In a new project add the following XAML code to a view (this code is taken directly from the docs):
<Entry Placeholder="Enter name">
    <Entry.Triggers>
        <Trigger TargetType="Entry"
                 Property="IsFocused"
                 Value="True">
            <Setter Property="BackgroundColor"
                    Value="Yellow" />
            <!-- Multiple Setter elements are allowed -->
        </Trigger>
    </Entry.Triggers>
</Entry>
  1. Run the project and navigate to the page with the entry on.
  2. Focus on the entry.
  3. It does not turn yellow.

Version with bug

Preview 13 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, Windows

Affected platform versions

NA

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Labels

area-xamlXAML, CSS, Triggers, Behaviorsdelighterfixed-in-6.0.408Look for this fix in 6.0.408!p/1Work that is important, and has been scheduled for release in this or an upcoming sprintplatform/androidplatform/windowss/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions