Reputation:
I have to define a combobox through code behind:
var cmbLogin = new ComboBox()
{
Width = 200,
Height = m_dFontSize + 10,
FontSize = m_dFontSize,
Margin = new Thickness(20),
BorderBrush = new SolidColorBrush(m_ExeCfg.GetForeground()),
HorizontalContentAlignment = HorizontalAlignment.Center,
Background = Brushes.Transparent,<--------------HERE
Foreground = new SolidColorBrush(m_ExeCfg.GetForeground()),
Focusable = true,
};
so the background gets transparent in win7 but not in win10.
I have seen some solutions through xaml but could'nt apply them in code behind only. Thanx
Upvotes: 1
Views: 7554