How to : Change background of selection cursor for autocomplete SfTextBoxExt

Hello all,

I need help to style my sfTextBoxExt

As you can see in above SS the selection is on 2nd line but the background is light gray, i want to change it to yellow.


following is my UI code :

<sf:SfTextInputLayout

                                Margin="5,0,5,0"

                                Hint="Name">

                                <sf:SfTextBoxExt

                                    x:Name="txtItemName"

                                    Width="200"

                                    Margin="0"

                                    cal:Message.Attach="[Event KeyDown] = [Action ItemCode_ItemName_KeyDown($source,$eventArgs)]"

                                    AutoCompleteMode="Suggest"

                                    AutoCompleteSource="{Binding Items}"

                                    Background="Yellow"

                                    MaxDropDownHeight="120"

                                    SearchItemPath="ItemName"

                                    SelectedItem="{Binding SelectedItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}"

                                    SuggestionMode="Contains">

                                    <sf:SfTextBoxExt.AutoCompleteItemTemplate>

                                        <DataTemplate>

                                            <TextBlock>

                                                <Run

                                                    Text="{Binding ItemName}" />

                                                <Run

                                                    Text="(" />

                                                <Run

                                                    Text="{Binding ItemUnit.unitShortName}" />

                                                <Run

                                                    Text=")" />

                                            </TextBlock>

                                        </DataTemplate>

                                    </sf:SfTextBoxExt.AutoCompleteItemTemplate>

                                </sf:SfTextBoxExt>


1 Reply

RS Ruba Shanmugam Syncfusion Team August 12, 2021 12:17 PM UTC

Hi Dhairya Joshi, 
Greetings from Syncfusion, 
We have validated your query and we would like to let you know that, you can achieve the selection background color of SfTextBoxExt by using SelectionBackgroundColor API. For more information refer the below sample and link. 
Screenshot: 
 
Please let me know, if you have any other concerns. 
Regards, 
Ruba Shanmugam 


Loader.
Up arrow icon