Use WPF to create the first application. The implementation functions are as follows:
Click the "Red" button, the text appears red, click the "Black" button, the text appears black; Click the "Back" button to exit the current application.
The implementation steps are as follows:
- Create a new project and select a WPF program.
- Select the Windows window that you created, and in the properties, change the title to create a WPF application using Visual Studio 2015.
- Add lable to change the content to "Hello wpf!", and the background color background color in the property.
- Add three buttons and the text appears as "Red", "Black", and "back".
- In the properties, add the Click event to each button: Double-click the blank after click.
- The Click events are: Label. Foreground = Brushes.red;label. Foreground = Brushes.black; Application.Current.Shutdown ();
- Click Start.
WPF Note 1 creating a WPF program with VS2015