I have the following scenario:
Image img = new Image();
img.Visibility = false;
img.Source = "..some path here..";
Frame.Navigate(typeof(Photos), img);
upon navigating to the new Photos page, I’m passing the image object I just created.
Would this new image object be passed as a copy of the original object, thus allocating some more memory, or would this object continue on to the new page as a reference?
If this won’t pass as a reference – how would you implement this? moving an object along the lifecycle of my app from page to page without having to recreate it each time?
As Image is a reference type, a reference is passed.
I suggest reading a C# beginner book front to end – the concept of reference types is core fundamental to the whole design of the language.