change color of button in wpf C# after click and after 2 minutes retain the original color

后端 未结 4 1919
眼角桃花
眼角桃花 2021-01-22 10:33

I am using this code

        Hello.Background = System.Windows.Media.Brushes.Blue;
        var dispatcherTimer = new DispatcherTimer();
        dispatcherTimer.I         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-22 10:58

    You could just create a Style and use a Trigger to start a Storyboard with ColorAnimations

    Example:

    
    

提交回复
热议问题