How add page in page?
I have 2 pages.
Page1 with some grid.
Page2 with some elements.
Gui in cpp.
How add page2 to page1 and get pointers of elements in internal page2?
Page1 with some grid.
Page2 with some elements.
Gui in cpp.
How add page2 to page1 and get pointers of elements in internal page2?
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: How add page in page?
Hi,
A Grid is a panel which exposes a list of children elements. You can just add a new loaded page to the grid by doing:
And to access the children of the page you can iterate them using VisualTreeHelper, or if they are named elements (x:Name), then you can just look for them in the loaded page by doing:
Is that what you are looking for?
A Grid is a panel which exposes a list of children elements. You can just add a new loaded page to the grid by doing:
Code: Select all
Noesis::Ptr<Noesis::Page> page2 = Noesis::GUI::LoadXaml<Noesis::Page>("Page2.xaml");
grid->GetChildren()->Add(page2);
Code: Select all
Noesis::Button someButton = page2->FindName<Noesis::Button>("someButton");
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: How add page in page?
Great, marking this as solved.
Who is online
Users browsing this forum: Google [Bot] and 39 guests