Hello Telerik!
So my current setup is an app which has a nested RadFrameContainer, which works like a charm (result!). What I am currently trying to do is access a RadPanelBar on the main page from a RadPage that has been loaded into the RadFrame in the container. Now, normally for any usercontrol that was loaded in my old, custom navigation framework, I could do...
Which used to work well and good, but now I'm running into an issue accessing rpbPanelBar. Now, per the documentation my App.cs Application_Startup looks like this:
With Page containing a Grid with other controls as well as a RadFrameContainer (which contains a RadFrame, which is where navigation happens). Trying to figure out how to access the rpbPanelBar, I came up with the following...
But while I can see in intellisense that r contains rpbiAccount, at runtime r comes up as null. I tried switching RadPage for Page, but that also doesn't work.
More or less, I need to know what to do in order to access the original RadPage Page() that is the main page of my application. :)
Let me know if this is more of a support ticket issue and I'll happily submit my project, just figured there was an off chance that I was missing something simple that other people could use as well.
Thanks!
So my current setup is an app which has a nested RadFrameContainer, which works like a charm (result!). What I am currently trying to do is access a RadPanelBar on the main page from a RadPage that has been loaded into the RadFrame in the container. Now, normally for any usercontrol that was loaded in my old, custom navigation framework, I could do...
// RadPanelPar's x:Name="rpbPanelBar" |
Page p = (Page)Application.Current.RootVisual as Page; |
p.rpbPanelBar.Whatever = new Whatever(); |
Which used to work well and good, but now I'm running into an issue accessing rpbPanelBar. Now, per the documentation my App.cs Application_Startup looks like this:
private void Application_Startup(object sender, StartupEventArgs e) |
{ |
this.RootVisual = new RadFrameContainer(); |
NavigationService service = NavigationService.GetNavigationService(); |
service.Target = this.RootVisual as RadFrameContainer; |
service.Transition = new FadeTransition(); |
service.Navigate(new Page()); |
} |
With Page containing a Grid with other controls as well as a RadFrameContainer (which contains a RadFrame, which is where navigation happens). Trying to figure out how to access the rpbPanelBar, I came up with the following...
RadFrameContainer p = (RadFrameContainer)Application.Current.RootVisual as RadFrameContainer; |
Page r = (Page)p.Parent as Page; |
r.rpbiAccount.Visibility = Visibility.Visible; |
But while I can see in intellisense that r contains rpbiAccount, at runtime r comes up as null. I tried switching RadPage for Page, but that also doesn't work.
More or less, I need to know what to do in order to access the original RadPage Page() that is the main page of my application. :)
Let me know if this is more of a support ticket issue and I'll happily submit my project, just figured there was an off chance that I was missing something simple that other people could use as well.
Thanks!