I want to create a canvas which shows ads for like 10 sec and a button control which is grayed out for 10 seconds and after 10 seconds enables user to close the ad canvas.
I don’t know how to create that button control. Somebody help please.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you don’t want to go down the viewmodel route, you can use a Storyboard for this.
I threw together this MainPage:
The important parts are that the button has a name, and this name is specified in the Storyboard definition. The Storyboard is set to change IsEnabled to True at 10 seconds. Then in the MainPage.xaml.cs I kick of the Storyboard in the Loaded event: