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

[Bug] Apply an explicit style to an Entry using TextValidationBehavior with InvalidStyle #807

@Cfun1

Description

@Cfun1

Description

from #748

It seems impossible to apply an explicit style on an Entry which is using the InvalidStyle of TextValidationBehavior, you may say just append/add the explicit style to the InvalidStyle definition, but the issue is that the latter is only triggered upon text changed event I believe, thus the style won't be applied all the time.

Any ideas?

If I remove the Behaviors, SomeEntryStyle is applied, if I put back, only InvalidEntryStyle style will be applied when conditions met. the issue here is that SomeEntryStyle should be applied regardless.

I am not sure if I am missing something or something needs to change/improve in xct that why I have put it as a bug for now.

Steps to Reproduce

      <Entry Text="text"
                   Placeholder="palceholder"
                   Style="{StaticResource SomeEntryStyle}">
                <Entry.Behaviors>
                    <xct:EmailValidationBehavior DecorationFlags="Trim"
                                                 InvalidStyle="{StaticResource InvalidEntryStyle}"/>
                </Entry.Behaviors>
            </Entry>
    <ContentPage.Resources>
        <Style x:Key="SomeEntryStyle"
               TargetType="Entry">
            <Setter Property="TextColor" Value="White"/>
            <Setter Property="PlaceholderColor" Value="Blue"/>
            <Setter Property="BackgroundColor" Value="Purple"/>
            <Setter Property="Visual" Value="Material"/>
        </Style>

        <Style x:Key="InvalidEntryStyle"
               TargetType="Entry">
            <Setter Property="TextColor" Value="Red"/>
        </Style>
    </ContentPage.Resources>

Basic Information

  • Version with issue: 1.0.2
  • Last known good version: -
  • IDE: vs2019
  • Platform Target Frameworks: All

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Breaky break.in-progressActively being worked on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions