{"action":"created","issue":{"url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/289","labels_url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/289/comments","events_url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/289/events","html_url":"https://github.com/viperneo/winforms-modernui/issues/289","id":91223298,"number":289,"title":"MetroComboBox dropdown list background color","user":{"login":"FatimaRmayhi","id":13048540,"avatar_url":"https://avatars.githubusercontent.com/u/13048540?v=3","gravatar_id":"","url":"https://api.github.com/users/FatimaRmayhi","html_url":"https://github.com/FatimaRmayhi","followers_url":"https://api.github.com/users/FatimaRmayhi/followers","following_url":"https://api.github.com/users/FatimaRmayhi/following{/other_user}","gists_url":"https://api.github.com/users/FatimaRmayhi/gists{/gist_id}","starred_url":"https://api.github.com/users/FatimaRmayhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FatimaRmayhi/subscriptions","organizations_url":"https://api.github.com/users/FatimaRmayhi/orgs","repos_url":"https://api.github.com/users/FatimaRmayhi/repos","events_url":"https://api.github.com/users/FatimaRmayhi/events{/privacy}","received_events_url":"https://api.github.com/users/FatimaRmayhi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-26T10:53:46Z","updated_at":"2015-07-05T13:24:41Z","closed_at":null,"body":"Sometimes, this issue occurs with my project:\r\n1- open a form containing many controls (a combobox + 2 buttons for example).\r\n2- Press Tab to move between controls.\r\n3- click on the combobox, dropdownlist background color is colored by Style color.\r\n\r\nFind the screenshot below\r\nthe style I used is blue, if you use Orange style color, the items will be colored in orange.\r\n\r\n![screenshot](https://cloud.githubusercontent.com/assets/13048540/8375955/b7fd0a38-1c0a-11e5-952d-a92dea6d4063.png)\r\n"},"comment":{"url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/comments/118619624","html_url":"https://github.com/viperneo/winforms-modernui/issues/289#issuecomment-118619624","issue_url":"https://api.github.com/repos/viperneo/winforms-modernui/issues/289","id":118619624,"user":{"login":"FatimaRmayhi","id":13048540,"avatar_url":"https://avatars.githubusercontent.com/u/13048540?v=3","gravatar_id":"","url":"https://api.github.com/users/FatimaRmayhi","html_url":"https://github.com/FatimaRmayhi","followers_url":"https://api.github.com/users/FatimaRmayhi/followers","following_url":"https://api.github.com/users/FatimaRmayhi/following{/other_user}","gists_url":"https://api.github.com/users/FatimaRmayhi/gists{/gist_id}","starred_url":"https://api.github.com/users/FatimaRmayhi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FatimaRmayhi/subscriptions","organizations_url":"https://api.github.com/users/FatimaRmayhi/orgs","repos_url":"https://api.github.com/users/FatimaRmayhi/repos","events_url":"https://api.github.com/users/FatimaRmayhi/events{/privacy}","received_events_url":"https://api.github.com/users/FatimaRmayhi/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T13:24:41Z","updated_at":"2015-07-05T13:24:41Z","body":"I found the solution:\r\nIn MetroFrameWork project, MetroComboBox.cs class, OnDrawItem function:\r\nReplace the following lines:\r\nif (e.State == (DrawItemState.NoAccelerator | DrawItemState.NoFocusRect) || e.State == DrawItemState.None)\r\n                {\r\n                    using (SolidBrush b = new SolidBrush(backColor))\r\n                    {\r\n                        e.Graphics.FillRectangle(b, new Rectangle(e.Bounds.Left, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height));\r\n                    }\r\n\r\n                    foreColor = MetroPaint.ForeColor.Link.Normal(Theme);\r\n                }\r\n                else\r\n                {\r\n                    using (SolidBrush b = new SolidBrush(MetroPaint.GetStyleColor(Style)))\r\n                    {\r\n                        e.Graphics.FillRectangle(b, new Rectangle(e.Bounds.Left, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height));\r\n                    }\r\n\r\n                    foreColor = MetroPaint.ForeColor.Tile.Normal(Theme);\r\n                }\r\n\r\nBy:\r\nif ((e.State & DrawItemState.Selected) == DrawItemState.Selected)\r\n                {\r\n                    using (SolidBrush b = new SolidBrush(MetroPaint.GetStyleColor(Style)))\r\n                    {\r\n                        e.Graphics.FillRectangle(b, new Rectangle(e.Bounds.Left, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height));\r\n                    }\r\n\r\n                    foreColor = MetroPaint.ForeColor.Tile.Normal(Theme);\r\n                }\r\n                else\r\n                {\r\n                    using (SolidBrush b = new SolidBrush(backColor))\r\n                    {\r\n                        e.Graphics.FillRectangle(b, new Rectangle(e.Bounds.Left, e.Bounds.Top, e.Bounds.Width, e.Bounds.Height));\r\n                    }\r\n\r\n                    foreColor = MetroPaint.ForeColor.Link.Normal(Theme);\r\n                }\r\n"}}