我希望能够实现WPF窗口背景
颜色的渐变效果。
怎么做呢?
例如:
Brush i_color = Brushes.Red; //this is the initial color
Brush f_color = Brushes.Blue; //this is the final color
当我点击
Button
按钮1时。private void button1_Click(object sender, RoutedEventArgs e)
{
this.Background = f_color; //here the transition begins. I don't want to be quick. Maybe an interval of 4 seconds.
}