1. 程式人生 > >WPF C#設定 背景色

WPF C#設定 背景色

			   `  Label tyLabe = new Label();
                    tyLabe.SetResourceReference( Label.StyleProperty , "TypeLabelStyle");             
                    System.Windows.Media.Color color = 	(System.Windows.Media.Color)System.Windows.Media.ColorConverter.ConvertFromString("#000000");
                    tyLabe.Background = new SolidColorBrush(color);`