We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Style for bacckground and seleced label

how can i change the Background and Textcolor of the Displayed Selection using the RessourceDirectory in the App.xaml file?


9 Replies

VV Vijayakumar Viswanathan Syncfusion Team January 10, 2023 01:38 PM UTC

Hi Andreas,

Thanks for reaching out to Syncfusion Support

We couldn't able to get your exact requirement on SfComboBox. It was unclear whether you wanted to customize the selected item in the entry field or in the drop-down list.  It would be helpful if you could provide more detailed information about this requirement, in order to better understand and investigate further the issue.


Regards,

Vijayakumar V



AN Andreas January 10, 2023 04:19 PM UTC

i want an answer for both please.



AN Andreas January 10, 2023 04:29 PM UTC

there the details. 






Attachment: download.png_e673bdff.zip


VV Vijayakumar Viswanathan Syncfusion Team January 11, 2023 03:06 PM UTC

Hi Andreas,

Currently, SfComboBox doesn't support the selectedItem customization both in the entry field and the drop-down list.

We have already received a feature request for DropDown customization, SelectedTextColor support and are actively working on its implementation. You can follow the progress of this request using the following feedback link. And also we planned for ItemTemplate Property after the dropdown customization support.

https://www.syncfusion.com/feedback/39551/dropdown-needs-background-color-setting-and-smart-height.

We anticipate that this feature will be included in our Volume 1 main release of 2023, tentatively scheduled for the end of March/2023. If you have any additional specifications or suggestions for this feature request, you can add them as a comment in the portal. We will provide release details in the feedback itself."


Regards,

Vijayakumar V



VV Vijayakumar Viswanathan Syncfusion Team March 18, 2023 03:10 AM UTC

Hi Andreas,

Unfortunately, we could not include the feature of color customization for the dropdown of the SfComboBox Control in the Volume 1 main release. However, we have scheduled to incorporate this support in the upcoming Volume 2 main release, which is expected to be available by the end of June 2023. We apologize for any inconvenience caused by this delay.


Regards

Vijayakumar V



TV Thijs van Rijswijk replied to Vijayakumar Viswanathan April 16, 2023 10:42 PM UTC

Goodmorning,


Really that long?

I have the same problem with the backgroundcolor of the dropdown.




Best regards,


Thijs van Rijswijk



VV Vijayakumar Viswanathan Syncfusion Team April 17, 2023 06:43 AM UTC

Hi Thijs,

As previously mentioned, we have planned to include this support in the upcoming major release of Volume 2, which is anticipated to be available by the end of June 2023. We will inform you once it is implemented, and we appreciate your patience until that time.



TA Tim Arnodt replied to Thijs van Rijswijk May 3, 2023 02:26 PM UTC

Hi Thijs van Rijswijk,

You can use the PropertyChanged Event and the IsDropDownOpen Property as a Workaround for now.

private void SfComboBox_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
if (e.PropertyName is nameof(SfComboBox.IsDropDownOpen) && sender is SfComboBox cb)
{
if (cb.IsDropDownOpen)
{
cb.TextColor = Color.FromArgb("#000000");
}
else
{
cb.TextColor = Color.FromArgb("#FFFFFF");
}
}
}

It isn't pretty but better than an unreadable DropDown.



VV Vijayakumar Viswanathan Syncfusion Team June 29, 2023 01:03 PM UTC

Hi,

We are glad to announce that our Essential Studio 2023 Volume 2 Main Release v22.1.34 is rolled out and is available for download under the following link.

 

Essential Studio 2023 Volume 2 Main Release v22.1.34 is available for download | Announcements Forums | Syncfusion.


The support of customizing the selected item in the SfComboBox has been implemented by employing default style keys. This notable feature has been duly incorporated in the current release. By utilizing this support, it is now possible to customize the background of both the selected items and the dropdown. To modify the text color of the selected item, kindly use the data template selector. To further assist in understanding the customization of the SfComboBox, a demo sample has been prepared and can be obtained from the attached files.


Attachment: SfComboBoxColor_912dc48d.zip

Loader.
Up arrow icon