dotnet / dotnet/wpf

How to change Foreground color of a ComboBox on SelectionChanged in WPF?

Open
#7,514 1 comment 0 reactions 0 assignees View on GitHub
Investigate Question
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

_This issue has been moved from [a ticket on Developer Community](https://developercommunity.visualstudio.com/t/How-to-change-Foreground-color-of-a-Comb/10238960)._

---
Hi there, I have a WPF application where I use a ComboBox. But my problem is, the ComboBox foreground color that means the text color are flatucating when I change the selection of the ComboBox. But I need to remove the fluctuation and give it to the Foreground color #939393 (Grey).

Here is my Control template:

```



























































































```
When I close the drop down of the ComboBox the Foreground color first changes to white and after that it becomes grey But I only want the Grey (#939393). Though the Foreground color changes too quickly and it's very hard to notice that's why I attach some GIF to understand it better.

And this is the effect I want :
![Original.gif](https://aka.ms/dc/image?name=B4c6dd12f9142473296e88dfdb6366423638076632016316261_Original.gif&tid=4c6dd12f9142473296e88dfdb6366423638076632016316261)

But Iget this effect:
![My.gif](https://aka.ms/dc/image?name=B31e13f14adbb495f8d8494faddcf658a638076632569199368_My.gif&tid=31e13f14adbb495f8d8494faddcf658a638076632569199368)

---
### Original Comments

#### Feedback Bot on 12/27/2022, 07:47 AM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 12/27/2022, 03:39 PM:

(private comment, text removed)
#### Merun Maity on 12/27/2022, 11:24 PM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 12/28/2022, 01:53 PM:

(private comment, text removed)
#### Merun Maity on 12/29/2022, 04:00 AM:

(private comment, text removed)
#### Dolly Wang [MSFT] on 12/29/2022, 02:14 PM:

(private comment, text removed)
#### Feedback Bot on 12/29/2022, 02:43 PM:

(private comment, text removed)

---
### Original Solutions
(no solutions)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.