Thực hiện một indexer giao diện bằng cách sử dụng thực hiện giao diện rõ ràng trong một lớp học hoặc cấu trúc Trong lớp hoặc cấu trúc thực hiện các giao diện, một cách rõ ràng tên giao diện, nhưng không xác định khả năng tiếp cận indexer. | Chapter 22 Introducing Windows Presentation Foundation 443 11. On the Debug menu click Start Without Debugging to verify that the project builds and runs. 12. When th e form opens click the Tower combo box. You will see the list of bell towers and you can select one of them. 13. Click the drop-down arrow on the right side of the Member Since date time picker. You will be presented with a calendar of dates. The default value will be the current date. You can click a date and use the arrows to select a month. You can also click the month name to display the months as a drop-down list and click the year so that you can select a year by using a numeric up-down control. 14. Click eac h of the radio buttons in the Experience group box. Notice that you cannot select more than one radio button at a time. 15. In the Methods list box click some of the methods to select the corresponding check box. If you click a method a second time it clears the corresponding check box just as you would expect. 16. Click the Add and Clear buttons. Currently these buttons don t do anything. You will add this functionality in the final set of exercises in this chapter. 17. Close the form and return to Visual Studio 2008. Handling Events in a WPF Form If you are familiar with Microsoft Visual Basic Microsoft Foundation Classes MFC or any of the other tools available for building GUI applications for Windows you are aware that Windows uses an event-driven model to determine when to execute code. In Chapter 17 Interrupting Program Flow and Handling Events you saw how to publish your own events and subscribe to them. WPF forms and controls have their own predefined events that you can subscribe to and these events should be sufficient to handle the requirements of most user interfaces. Processing Events in Windows Forms The developer s task is to capture the events that are relevant to the application and write the code that responds to these events. A familiar example is the Button control which