Trying to change Background color of TextBox within RadComboBox

2 posts, 0 answers
  1. Mark
    Mark avatar
    2 posts
    Member since:
    May 2016

    Posted 28 Nov 2016 Link to this post

    I am trying to color the Background of the TextBox within the RadComoboBox to be Pink is the search typed in fails.

    <Style TargetType="TextBox" x:Key="CustomComboTextBoxStyle"  >
        <Style.Triggers>
            <DataTrigger Binding="{Binding SearchFailed}" Value="true">
                <Setter Property="Background" Value="LightPink" />
            </DataTrigger>
            <DataTrigger Binding="{Binding SearchFailed}" Value="false">
                <Setter Property="Background" Value="White" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

     

    When I run, the SearchFailed is false and the background is white and that appears to work.  But when SearchFailed is true, the background does not change.

    public bool SearchFailed
    {
        get { return _searchFailed; }
        set
        {
            _searchFailed = value;
            NotifyPropertyChanged( "SearchFailed" );
        }
    }

    Is there something I need to do to tell the RadComboBox to update?

  2. Mark
    Mark avatar
    2 posts
    Member since:
    May 2016

    Posted 28 Nov 2016 in reply to Mark Link to this post

    I solved but adding NotifyOnSourceUpdated=True on BOTH not just one.
Back to Top