I am developing an application for Windows Phone 7. I am new to silver light. In my application, I need a dynamic combobox. Therefore, I use the following code
ComboBox CurrenciesCombobox = null;
CurrenciesCombobox = new ComboBox();
CurrenciesCombobox.Name = "CurrencyCombobox";
CurrenciesCombobox.SetValue(Canvas.TopProperty, 10.00);
CurrenciesCombobox.SetValue(Canvas.LeftProperty, 10.00);
CurrenciesCombobox.Margin = new Thickness(235, 395, 139, 180);
CurrenciesCombobox.ItemsSource = Currencies;
CurrenciesCombobox.SelectionChanged += new SelectionChangedEventHandler(CurrenciesCombobox_SelectionChanged);
ContentPanel.Children.Add(CurrenciesCombobox);
In the above code, I do not know how to set the right side of the following statement
CurrenciesCombobox.Foreground = ;
Could you tell me how to set the Foreground property for combobx? Can you provide me with any code or link through which I can solve the above problem? If I am doing something wrong, then please guide me.
source
share