我正在開發window phone 7應用程序。我是新來的銀光。在我的應用程序中,我需要一個動態組合框。所以我用下面的代碼如何動態設置combox的Foreground屬性?
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.Foreground = ;
CurrenciesCombobox.ItemsSource = Currencies;
CurrenciesCombobox.SelectionChanged += new SelectionChangedEventHandler(CurrenciesCombobox_SelectionChanged);
ContentPanel.Children.Add(CurrenciesCombobox);
在上面的代碼,我不知道如何設置下面的語句的右手邊
CurrenciesCombobox.Foreground = ;
能否請你告訴我如何設置前景色combobx的屬性? 你能否給我提供任何可以解決上述問題的代碼或鏈接?如果我做錯了什麼,請指導我。