How can I access child page controls from the parent page in a Silverlight 3/4 Navigation Application? I wish to hide an image from the child page when I click a button in the parent page.
I think you can do this by returning a reference to the child page to the parent page when the navigation frame's Navigated event completes. The NavigationEventArgs parameter has a "Content" property which is set to the child page which has just been navigated to.
Related
Context
I'm building a social network based on a parent/children relationship. It looks like a hierarchical pyramidal tree like this :
User Interface
Here is a first shot at the user interface :
The main part (big white block in the middle) is the user "wall" (as the facebook wall), with some specific fonctionalities.
The top home button is a link to the parent user.
The bottom buttons are links to children users
Navigation Animations / Transitions
I just discovered Meteor and React and feel now able to make the navigation awesome !
The idea is that when you click on a user button (parent or child), the button becomes the central wall div, a new parent user button appears from the top, old children buttons disappear and new children button appaears from aside. If needed, i'll try to make a gif.
The problem
User buttons and member wall are the same component with different state, "parent'/"current"/"child" with associated css class.
Clicking a children button or parent button will change the URL, we will go from "member/iduser1" to "member/iduser2". So the idea is to load the missing components and change the state of the ones already present on the page.
I can pass an array of children ids, the current id and the parent id to the wrapper in order to build the different components, but won't they be completly rebuild ? My goal is just to change their status
I have an angular app which will display an image from an array for instance
images[$scope.activeIndex]
On the page is a link that will do a window open popup and on this popup page will be a next button. How does the child page affect the parent page. So the next button will call a function on the parent page which will increase the $scope.activeIndex by 1 and change some other scope values, which changes the image on the parent page
Typically communication between controllers is done via events. See this SO question for more detail.
In general, the child controller fires an event on the button click then the parent controller handles the event.
$location object seems to be the modal one, not the parent one.
My modal performs an operation over a listing in the parent window, so when user clicks a button into the modal i want to close the modal (already accomplished) and reload the listing (parent) window.
Calling the controller of the parent window would perform a new listing so would be also nice.
Is there anyway I can have one mainpage, with tabs, which load child pages in the content area, but also have within the child page another navigation menu which loads siblings into the same content area it itself is in?
This is just a nested navigation frame situation really.
Do not create a second navigation frame. Simply set the datacontext of the hyperlink button on the nested page to the page where your navigation frame is, that way it can be targeted.
I created one master page with navigation frame. In a child page also containing one navigation frame once Child page loaded the outer next prev buttons are not working...
instead of using the hyperlinks, create a button with a click event. Then call
this.subframe.Navigate(new Uri("/Views/AboutContent/AboutPage1.xaml", UriKind.Relative));
subframe is the name of your nested frame. That should do it
you may also have to set this property in your nested frame:
JournalOwnership="OwnsJournal"