# Accessing the Parent

**URL:** <https://forum.kirupa.com/t/accessing-the-parent/297703>\
**Category:** programming\
**Created:** [October 7, 2009, 11:36am UTC](https://forum.kirupa.com/t/accessing-the-parent/297703 "2009-10-07T11:36:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webtecs](https://avatars.discourse-cdn.com/v4/letter/w/b77776/32.png) [@webtecs](https://forum.kirupa.com/u/webtecs)\
**Post date:** [October 7, 2009, 11:36am UTC](https://forum.kirupa.com/t/accessing-the-parent/297703/1 "2009-10-07T11:36:36Z")

</div>

Hi

I am new to SilverLight and still not familiar with all the terminology yet.

I am trying to access the parent (“MainPage”) from a Navigation Page (“ManageUsers”) in a Frame using:

[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]MainPage[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] rootPage = [/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]Application[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2].Current.RootVisual [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]as[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]MainPage[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2];[/SIZE]

When I run my SilverLight App and go to the ManageUsers page the rootPage is always null, however, if I use:

[SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]MainPage[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] rootPage = [/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#2b91af][SIZE=2][COLOR=#2b91af]MainPage[/COLOR][/SIZE][/COLOR][/SIZE]SIZE=2;[/SIZE]

it works. I suspect the issue may be with the fact I am using a PageSwitcher to move from a LogIn page to the MainPage.

Thanks in advance

Mark
