BrushesでRGB指定をしたい場合の処理
TextBlock.Foregroundとかで、Brushesを普段指定してるが、
RGBとかで細かい指定をしたい場合の処理。
TextBlock text = new TextBlock(); text.Foreground = new SolidColorBrush(Color.FromArgb(alpha, red, green, blue));
とするといいらしい。
SolidColorBrushの他に、グラデーションも簡単に掛けれるらしい。
WPFさんマジパネェっす!
Microsoft Visual Studio 2010 Professional アップグレード
posted with amazlet at 11.11.18