C#WPF代码有点过..... [英] C# WPF code is a bit off.....
本文介绍了C#WPF代码有点过.....的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的代码
this is my code
BrushConverter conv = new BrushConverter();
SolidColorBrush brush = conv.ConvertFromString(comboBox1.Text) as SolidColorBrush;
this.comboBox1.Background = brush;
由于某些原因,组合框的颜色与所选文本的颜色不同.
请帮帮我.
在此先感谢.
for some reason the colour of the combobox isn''t the same colour of what the text is selected.
Please help me.
Thanks in Advance.
推荐答案
好吧,这段代码显然存在问题,但是,您是否视而不见?您检查显示器设置了吗?我看不到将"Blue"传递给此代码怎么会导致不是Blue的画笔.您是否正在调试并检查代码本身以查看画笔是什么颜色?
Well, obviously there''s issues with this code, but, are you color blind ? Have you checked your monitor settings ? I don''t see how passing ''Blue'' to this code could ever result in a brush that is not Blue. Are you debugging and checking the code itself to see what color the brush is ?
这篇关于C#WPF代码有点过.....的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文