All, I am new to Windows 7 Phone. My situation is that I have a main page which contains a ScrollViewer
which in turn houses a StackPanel
. I want to populate this StackPanel
with multiple sub-StackPanel
s (at runtime) which are to hold an Image Thumb nail a hyperlink and some basic information about the image.
This is all good when I do this from the main page, but I want to know how to update this control (which is on the main page), but from any page other than the main page. I would like to know what is considered best practice for updating a page's control (like that outlined above) from another page.
Obviously there are a number of ways to pass data between pages
PhoneApplicationService.Current.State["yourparam"] = param
NavigationService.Navigate(new Uri("/view/Page.xaml", UriKind.Relative));
then in other page simply
var k = PhoneApplicationService.Current.State["yourparam"];
and many others. But what is best practice for updating a generic control from a different page?
Note: There are many question about data access and passing between pages.
- Passing data from page to page
- How to pass the image value in one xaml page to another xaml page in windows phone 7?
- Passing image from one page to another windows phone 7
and more. This is not what I am asking.