Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コントロールにフォーカスがなく、選択範囲が非表示になっていない場合に、リストビューアイテムの背景を定義するシステムカラーはありますか?もしそうなら、私はそれを見つけることができません。
編集:それはMenuBar(またはControlFace、またはControl)として.Netにリストされているものだと思いますが、誰かがそれを確認できればいいのですが。
私はいつもそのためのSystemColors.Control色を使用しました、そしてそれは決して一致しません。
SystemColors.Control
を使用している場合VisualStylesは、自分でレンダリングしてみることができます。
VisualStyles
var vsr = new VisualStyleRenderer( VisualStyleElement.ListView.Item.SelectedNotFocus); vsr.DrawBackground(e.Graphics, rect);