Reputation: 375
Please tell me , how to change the background color of Canvas control when double tap occurs and when again do the double tap occur, it has to be changed previous color(back and forth applying color in canvas Control) in windows Phone 7.
Thanks.
Upvotes: 1
Views: 746
Reputation: 7122
First, set x:Name attribute in XAML for your Canvas control - e.g. x:Name="canvas". In the code behind, refer to it as if it was a variable and change the background with the following code:
canvas.Background = new SolidColorBrush(Color.Red)
Upvotes: 1