Edit code behind
This procedure provides an example of how to edit the code behind in a Silverlight form.
Before you begin
Procedure
- In the Project tab, expand MainPage.xaml to reveal MainPage.xaml.cs.The code behind editor does not yet support IntelliSense, so adding code must be done carefully. To add a pop-up message box from code behind, modify the MainPage.xaml.cs file as follows:Register an event handler in the constructor (adding your code just after InitializeProficyData(), as shown):
Add the handler code to MainPage.xaml.cs:public MainPage() { InitializeProficyData(); Button1.Click += SayHello; }
private void SayHello(Object sender, EventArgs args) { MessageBox.Show("Hello"); }
- Click Save to save the project and its output.
- Select the form in the Workflow client and view it in the Global Viewer to see the compiled form running.