I want to a pass local object to the event handler. How can I do that? For example, how can I reference the "graphic" object, which is declared in the main function below, in the event handler function "hyperlinkButton_Click"?
void main()
{
Graphic graphic = new Graphic();
hyperlinkButton.Click+=new RoutedEventHandler(hyperlinkButton_Click);
}
void hyperlinkButton_Click(object sender, EventArgs e)
{
}