If your function is being called from the code behind of Window1 you can pass the canvas as a parameter to your function.
public void AddEllipse(Canvas canvas)
{
...
...
canvas.Children.Add(node);
}
If your function is being called from some other code you can expose the canvas as a public property of Window1.
public Canvas Canvas1
{
get
{
return canvas1;
}
}
Then through any instance of Window1 you can access the Canvas1 property and pass it to your function.